Fixing tests
This commit is contained in:
parent
e61ce203a3
commit
07b92fecf3
|
@ -66,6 +66,8 @@ class BuildFactory
|
|||
case 'svn':
|
||||
$type = 'SubversionBuild';
|
||||
break;
|
||||
default:
|
||||
return $build;
|
||||
}
|
||||
|
||||
$class = '\\PHPCI\\Model\\Build\\' . $type;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
10
composer.lock
generated
10
composer.lock
generated
|
@ -1781,16 +1781,16 @@
|
|||
},
|
||||
{
|
||||
"name": "sebastian/global-state",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/global-state.git",
|
||||
"reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01"
|
||||
"reference": "23af31f402993cfd94e99cbc4b782e9a78eb0e97"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/c7428acdb62ece0a45e6306f1ae85e1c05b09c01",
|
||||
"reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23af31f402993cfd94e99cbc4b782e9a78eb0e97",
|
||||
"reference": "23af31f402993cfd94e99cbc4b782e9a78eb0e97",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1828,7 +1828,7 @@
|
|||
"keywords": [
|
||||
"global state"
|
||||
],
|
||||
"time": "2014-10-06 09:23:50"
|
||||
"time": "2015-06-21 15:11:22"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/recursion-context",
|
||||
|
|
Loading…
Reference in a new issue