Conditions | 1 |
Paths | 1 |
Total Lines | 34 |
Code Lines | 22 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
28 | public function testSuccessful() { |
||
29 | $step = $this->getDummyDeployment(); |
||
30 | $step->start(); |
||
31 | |||
32 | // Assert not error at startup |
||
33 | $this->assertEquals('Started', $step->Status); |
||
1 ignored issue
–
show
|
|||
34 | $this->assertEquals('Snapshot', $step->Doing); |
||
1 ignored issue
–
show
|
|||
35 | $this->assertTrue(PipelineTest_MockLog::has_message('TestDeployStep:Snapshot creating snapshot of database')); |
||
1 ignored issue
–
show
|
|||
36 | |||
37 | // Mark the snapshot as completed and check result |
||
38 | $snapshot = $step->Pipeline()->PreviousSnapshot(); |
||
39 | $snapshot->markFinished(); |
||
40 | |||
41 | // Retry step |
||
42 | PipelineTest_MockLog::clear(); |
||
43 | $step->start(); |
||
44 | |||
45 | $this->assertEquals('Started', $step->Status); |
||
1 ignored issue
–
show
|
|||
46 | $this->assertEquals('Deployment', $step->Doing); |
||
1 ignored issue
–
show
|
|||
47 | $this->assertTrue(PipelineTest_MockLog::has_message('TestDeployStep:Deployment starting deployment')); |
||
1 ignored issue
–
show
|
|||
48 | |||
49 | // Mark the service as completed and check result |
||
50 | $author = $this->objFromFixture('Member', 'author'); |
||
51 | $deployment = $step->Pipeline()->CurrentDeployment(); |
||
52 | $this->assertEquals($deployment->DeployerID, $author->ID); |
||
1 ignored issue
–
show
|
|||
53 | $deployment->markFinished(); |
||
54 | |||
55 | // Retry step |
||
56 | PipelineTest_MockLog::clear(); |
||
57 | $step->start(); |
||
58 | $this->assertEquals('Finished', $step->Status); |
||
1 ignored issue
–
show
|
|||
59 | $this->assertTrue(PipelineTest_MockLog::has_message('Checking status of TestDeployStep:Deployment...')); |
||
1 ignored issue
–
show
|
|||
60 | $this->assertTrue(PipelineTest_MockLog::has_message('Step finished successfully!')); |
||
1 ignored issue
–
show
|
|||
61 | } |
||
62 | |||
210 |
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.