Fixing tests
This commit is contained in:
parent
42d6bce14c
commit
bb87c4d54c
|
@ -66,6 +66,8 @@ class BuildFactory
|
||||||
case 'svn':
|
case 'svn':
|
||||||
$type = 'SubversionBuild';
|
$type = 'SubversionBuild';
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
return $build;
|
||||||
}
|
}
|
||||||
|
|
||||||
$class = '\\PHPCI\\Model\\Build\\' . $type;
|
$class = '\\PHPCI\\Model\\Build\\' . $type;
|
||||||
|
|
|
@ -30,6 +30,11 @@ class Build extends BuildBase
|
||||||
|
|
||||||
public $currentBuildPath = null;
|
public $currentBuildPath = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var \PHPCI\Model\Project $project
|
||||||
|
*/
|
||||||
|
protected $project;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get link to commit from another source (i.e. Github)
|
* 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));
|
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",
|
"name": "sebastian/global-state",
|
||||||
"version": "1.0.0",
|
"version": "1.1.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/global-state.git",
|
"url": "https://github.com/sebastianbergmann/global-state.git",
|
||||||
"reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01"
|
"reference": "23af31f402993cfd94e99cbc4b782e9a78eb0e97"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/c7428acdb62ece0a45e6306f1ae85e1c05b09c01",
|
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23af31f402993cfd94e99cbc4b782e9a78eb0e97",
|
||||||
"reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01",
|
"reference": "23af31f402993cfd94e99cbc4b782e9a78eb0e97",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1828,7 +1828,7 @@
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"global state"
|
"global state"
|
||||||
],
|
],
|
||||||
"time": "2014-10-06 09:23:50"
|
"time": "2015-06-21 15:11:22"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/recursion-context",
|
"name": "sebastian/recursion-context",
|
||||||
|
|
Loading…
Reference in a new issue