Fixing tests
This commit is contained in:
parent
42d6bce14c
commit
bb87c4d54c
3 changed files with 33 additions and 5 deletions
|
|
@ -30,6 +30,11 @@ class Build extends BuildBase
|
|||
|
||||
public $currentBuildPath = null;
|
||||
|
||||
/**
|
||||
* @var \PHPCI\Model\Project $project
|
||||
*/
|
||||
protected $project;
|
||||
|
||||
/**
|
||||
* Get link to commit from another source (i.e. Github)
|
||||
*/
|
||||
|
|
@ -249,4 +254,25 @@ class Build extends BuildBase
|
|||
|
||||
exec(sprintf(IS_WIN ? 'rmdir /S /Q "%s"' : 'rm -Rf "%s"', $buildPath));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Project $value
|
||||
*/
|
||||
public function setProjectObject(\PHPCI\Model\Project $value)
|
||||
{
|
||||
$this->project = $value;
|
||||
return parent::setProjectObject($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Project model for this Build by Id.
|
||||
*/
|
||||
public function getProject()
|
||||
{
|
||||
if (empty($this->project)) {
|
||||
$this->project = parent::getProject();
|
||||
}
|
||||
|
||||
return $this->project;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue