Conditions | 1 |
Paths | 1 |
Total Lines | 36 |
Code Lines | 20 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
40 | public function testSuccessful() { |
||
41 | $pipeline = $this->getDummyPipeline(); |
||
42 | |||
43 | // Start failure |
||
44 | $pipeline->markFailed(); |
||
45 | $step = $pipeline->RollbackStep1(); |
||
46 | |||
47 | // Assert not error at startup |
||
48 | $this->assertEquals('Started', $step->Status); |
||
1 ignored issue
–
show
|
|||
49 | $this->assertEquals('Deployment', $step->Doing); |
||
1 ignored issue
–
show
|
|||
50 | $this->assertNotLogged('Maintenance page disabled'); // Shouldn't be disabled yet |
||
51 | |||
52 | // Mark the service as completed and check result |
||
53 | $deployment = $step->RollbackDeployment(); |
||
54 | $deployment->markFinished(); |
||
55 | |||
56 | // Re-enter step as if called from checkPipelineStatus |
||
57 | PipelineTest_MockLog::clear(); |
||
58 | $step->start(); |
||
59 | |||
60 | $this->assertEquals('Started', $step->Status); |
||
1 ignored issue
–
show
|
|||
61 | $this->assertEquals('Snapshot', $step->Doing); |
||
1 ignored issue
–
show
|
|||
62 | $this->assertNotLogged('Maintenance page disabled'); // Shouldn't be disabled yet |
||
63 | |||
64 | // Mark the snapshot as completed and check result |
||
65 | $snapshot = $step->RollbackDatabase(); |
||
66 | $snapshot->markFinished(); |
||
67 | |||
68 | // Re-enter step as if called from checkPipelineStatus |
||
69 | PipelineTest_MockLog::clear(); |
||
70 | $step->start(); |
||
71 | |||
72 | $this->assertEquals('Finished', $step->Status); |
||
1 ignored issue
–
show
|
|||
73 | // confirm the maintenace page has been left up for a failed rollback |
||
74 | $this->assertFalse(PipelineTest_MockLog::has_message('Enabling maintenance page for failed rollback')); |
||
75 | } |
||
76 | |||
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.