commit
4b41b99664
4 changed files with 17 additions and 7 deletions
|
|
@ -27,7 +27,7 @@ class BuildInterpolator
|
|||
$this->interpolation_vars['%COMMIT%'] = $build->getCommitId();
|
||||
$this->interpolation_vars['%PROJECT%'] = $build->getProjectId();
|
||||
$this->interpolation_vars['%BUILD%'] = $build->getId();
|
||||
$this->interpolation_vars['%PROJECT_TITLE%'] = $build->getProject()->getTitle();
|
||||
$this->interpolation_vars['%PROJECT_TITLE%'] = $build->getProjectTitle();
|
||||
$this->interpolation_vars['%BUILD_PATH%'] = $buildPath;
|
||||
$this->interpolation_vars['%BUILD_URI%'] = $phpCiUrl . "build/view/" . $build->getId();
|
||||
$this->interpolation_vars['%PHPCI_COMMIT%'] = $this->interpolation_vars['%COMMIT%'];
|
||||
|
|
|
|||
|
|
@ -36,6 +36,15 @@ class Build extends BuildBase
|
|||
return '#';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getProjectTitle()
|
||||
{
|
||||
$project = $this->getProject();
|
||||
return $project ? $project->getTitle() : "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Get link to branch from another source (i.e. Github)
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -106,9 +106,10 @@ class Email implements \PHPCI\Plugin
|
|||
}
|
||||
|
||||
/**
|
||||
* @param array|string $toAddresses Array or single address to send to
|
||||
* @param string $subject Email subject
|
||||
* @param string $body Email body
|
||||
* @param string[]|string $toAddresses Array or single address to send to
|
||||
* @param string[] $ccList
|
||||
* @param string $subject Email subject
|
||||
* @param string $body Email body
|
||||
* @return array Array of failed addresses
|
||||
*/
|
||||
public function sendEmail($toAddresses, $ccList, $subject, $body)
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ class EmailTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$this->mockMailer->expects($this->once())
|
||||
->method('send');
|
||||
$this->testedEmailPlugin->sendEmail("test@email.com", "hello", "body");
|
||||
$this->testedEmailPlugin->sendEmail("test@email.com", array(), "hello", "body");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -177,7 +177,7 @@ class EmailTest extends \PHPUnit_Framework_TestCase
|
|||
$this->mockMailer->expects($this->once())
|
||||
->method('send')
|
||||
->with($this->isInstanceOf('\Swift_Message'), $this->anything());
|
||||
$this->testedEmailPlugin->sendEmail($toAddress, $subject, $body);
|
||||
$this->testedEmailPlugin->sendEmail($toAddress, array(), $subject, $body);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -197,7 +197,7 @@ class EmailTest extends \PHPUnit_Framework_TestCase
|
|||
$actualMail = null;
|
||||
$this->catchMailPassedToSend($actualMail);
|
||||
|
||||
$this->testedEmailPlugin->sendEmail($toAddress, $subject, $body);
|
||||
$this->testedEmailPlugin->sendEmail($toAddress, array(), $subject, $body);
|
||||
|
||||
$this->assertSystemMail(
|
||||
$toAddress,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue