| Conditions | 1 |
| Paths | 1 |
| Total Lines | 32 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 105 | public function testSnapshotFailure() { |
||
| 106 | $pipeline = $this->getDummyPipeline(); |
||
| 107 | |||
| 108 | // Start failure |
||
| 109 | $pipeline->markFailed(); |
||
| 110 | $step = $pipeline->RollbackStep1(); |
||
| 111 | |||
| 112 | // Assert not error at startup |
||
| 113 | $this->assertEquals('Started', $step->Status); |
||
|
1 ignored issue
–
show
|
|||
| 114 | $this->assertEquals('Deployment', $step->Doing); |
||
|
1 ignored issue
–
show
|
|||
| 115 | |||
| 116 | // Mark the service as completed and check result |
||
| 117 | $deployment = $step->RollbackDeployment(); |
||
| 118 | $deployment->markFinished(); |
||
| 119 | |||
| 120 | // Re-enter step as if called from checkPipelineStatus |
||
| 121 | PipelineTest_MockLog::clear(); |
||
| 122 | $step->start(); |
||
| 123 | |||
| 124 | $this->assertEquals('Started', $step->Status); |
||
|
1 ignored issue
–
show
|
|||
| 125 | $this->assertEquals('Snapshot', $step->Doing); |
||
|
1 ignored issue
–
show
|
|||
| 126 | |||
| 127 | // Mark the snapshot as completed and check result |
||
| 128 | $snapshot = $step->RollbackDatabase(); |
||
| 129 | $snapshot->markFailed(); |
||
| 130 | |||
| 131 | // Re-enter step as if called from checkPipelineStatus |
||
| 132 | PipelineTest_MockLog::clear(); |
||
| 133 | $step->start(); |
||
| 134 | |||
| 135 | $this->assertEquals('Failed', $step->Status); |
||
|
1 ignored issue
–
show
|
|||
| 136 | } |
||
| 137 | |||
| 160 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.