| @@ 12-26 (lines=15) @@ | ||
| 9 | * |
|
| 10 | * @return DeploymentPipelineStep |
|
| 11 | */ |
|
| 12 | public function getDummyDeployment($newEnv = false) { |
|
| 13 | $deployStep = $this->objFromFixture('DeploymentPipelineStep', 'testdeploy'); |
|
| 14 | $deployStep->Config = serialize(array('MaxDuration' => '3600')); |
|
| 15 | $deployStep->write(); |
|
| 16 | $pipeline = $deployStep->Pipeline(); |
|
| 17 | ||
| 18 | // simulates a new environment that hasn't got any current build |
|
| 19 | if($newEnv) { |
|
| 20 | $pipeline->EnvironmentID = $this->idFromFixture('PipelineTest_Environment', 'newenvironment'); |
|
| 21 | } |
|
| 22 | ||
| 23 | $pipeline->Config = serialize(array()); |
|
| 24 | $pipeline->write(); |
|
| 25 | return $deployStep; |
|
| 26 | } |
|
| 27 | ||
| 28 | public function testSuccessful() { |
|
| 29 | $step = $this->getDummyDeployment(); |
|
| @@ 28-37 (lines=10) @@ | ||
| 25 | * |
|
| 26 | * @return DeploymentPipelineStep |
|
| 27 | */ |
|
| 28 | public function getDummyDeployment() { |
|
| 29 | $deployStep = $this->objFromFixture('DeploymentPipelineStep', 'testdeploy'); |
|
| 30 | $deployStep->Config = serialize(array('MaxDuration' => '3600')); |
|
| 31 | $deployStep->write(); |
|
| 32 | $pipeline = $deployStep->Pipeline(); |
|
| 33 | $pipeline->Config = serialize(array()); |
|
| 34 | $pipeline->DryRun = true; |
|
| 35 | $pipeline->write(); |
|
| 36 | return $deployStep; |
|
| 37 | } |
|
| 38 | ||
| 39 | /** |
|
| 40 | * @return RollbackStep |
|