|
@@ 43-62 (lines=20) @@
|
| 40 |
|
$this->assertNotContains('Error', $output); |
| 41 |
|
} |
| 42 |
|
|
| 43 |
|
public function testSmokeTestCommandNoLabels() |
| 44 |
|
{ |
| 45 |
|
$smokeTestOutput = $this->createMock(SmokeTestOutputInterface::class); |
| 46 |
|
$smokeTestOutput->expects($this->any())->method('isOK')->will($this->returnValue(true)); |
| 47 |
|
$smokeTestOutput->expects($this->any())->method('getMessages')->will($this->returnValue([])); |
| 48 |
|
|
| 49 |
|
$smokeTest1 = $this->createMock(SmokeTestInterface::class); |
| 50 |
|
$smokeTest1->expects($this->never())->method('run')->will($this->returnValue($smokeTestOutput)); |
| 51 |
|
$smokeTest1->expects($this->never())->method('getDescription'); |
| 52 |
|
|
| 53 |
|
$smokeTest2 = $this->createMock(SmokeTestInterface::class); |
| 54 |
|
$smokeTest2->expects($this->once())->method('run')->will($this->returnValue($smokeTestOutput)); |
| 55 |
|
$smokeTest2->expects($this->once())->method('getDescription'); |
| 56 |
|
|
| 57 |
|
$smokeTestRunCommand = new SmokeTestRunCommand(); |
| 58 |
|
$smokeTestRunCommand->addTest('id1', $smokeTest1, 'run', 'getDescription', ['wip']); |
| 59 |
|
$smokeTestRunCommand->addTest('id2', $smokeTest2, 'run', 'getDescription', ['critical']); |
| 60 |
|
|
| 61 |
|
$smokeTestRunCommand->run(new ArrayInput(['--label' => []]), new NullOutput()); |
| 62 |
|
} |
| 63 |
|
|
| 64 |
|
public function testSmokeTestCommandWipLabel() |
| 65 |
|
{ |
|
@@ 64-83 (lines=20) @@
|
| 61 |
|
$smokeTestRunCommand->run(new ArrayInput(['--label' => []]), new NullOutput()); |
| 62 |
|
} |
| 63 |
|
|
| 64 |
|
public function testSmokeTestCommandWipLabel() |
| 65 |
|
{ |
| 66 |
|
$smokeTestOutput = $this->createMock(SmokeTestOutputInterface::class); |
| 67 |
|
$smokeTestOutput->expects($this->any())->method('isOK')->will($this->returnValue(true)); |
| 68 |
|
$smokeTestOutput->expects($this->any())->method('getMessages')->will($this->returnValue([])); |
| 69 |
|
|
| 70 |
|
$smokeTest1 = $this->createMock(SmokeTestInterface::class); |
| 71 |
|
$smokeTest1->expects($this->once())->method('run')->will($this->returnValue($smokeTestOutput)); |
| 72 |
|
$smokeTest1->expects($this->once())->method('getDescription'); |
| 73 |
|
|
| 74 |
|
$smokeTest2 = $this->createMock(SmokeTestInterface::class); |
| 75 |
|
$smokeTest2->expects($this->never())->method('run')->will($this->returnValue($smokeTestOutput)); |
| 76 |
|
$smokeTest2->expects($this->never())->method('getDescription'); |
| 77 |
|
|
| 78 |
|
$smokeTestRunCommand = new SmokeTestRunCommand(); |
| 79 |
|
$smokeTestRunCommand->addTest('id1', $smokeTest1, 'run', 'getDescription', ['wip']); |
| 80 |
|
$smokeTestRunCommand->addTest('id2', $smokeTest2, 'run', 'getDescription', ['critical']); |
| 81 |
|
|
| 82 |
|
$smokeTestRunCommand->run(new ArrayInput(['--label' => ['wip']]), new NullOutput()); |
| 83 |
|
} |
| 84 |
|
|
| 85 |
|
public function testSmokeTestCommandAllTests() |
| 86 |
|
{ |
|
@@ 85-104 (lines=20) @@
|
| 82 |
|
$smokeTestRunCommand->run(new ArrayInput(['--label' => ['wip']]), new NullOutput()); |
| 83 |
|
} |
| 84 |
|
|
| 85 |
|
public function testSmokeTestCommandAllTests() |
| 86 |
|
{ |
| 87 |
|
$smokeTestOutput = $this->createMock(SmokeTestOutputInterface::class); |
| 88 |
|
$smokeTestOutput->expects($this->any())->method('isOK')->will($this->returnValue(true)); |
| 89 |
|
$smokeTestOutput->expects($this->any())->method('getMessages')->will($this->returnValue([])); |
| 90 |
|
|
| 91 |
|
$smokeTest1 = $this->createMock(SmokeTestInterface::class); |
| 92 |
|
$smokeTest1->expects($this->once())->method('run')->will($this->returnValue($smokeTestOutput)); |
| 93 |
|
$smokeTest1->expects($this->once())->method('getDescription'); |
| 94 |
|
|
| 95 |
|
$smokeTest2 = $this->createMock(SmokeTestInterface::class); |
| 96 |
|
$smokeTest2->expects($this->once())->method('run')->will($this->returnValue($smokeTestOutput)); |
| 97 |
|
$smokeTest2->expects($this->once())->method('getDescription'); |
| 98 |
|
|
| 99 |
|
$smokeTestRunCommand = new SmokeTestRunCommand(); |
| 100 |
|
$smokeTestRunCommand->addTest('id1', $smokeTest1, 'run', 'getDescription', ['wip']); |
| 101 |
|
$smokeTestRunCommand->addTest('id2', $smokeTest2, 'run', 'getDescription', ['critical']); |
| 102 |
|
|
| 103 |
|
$smokeTestRunCommand->run(new ArrayInput(['--all' => true]), new NullOutput()); |
| 104 |
|
} |
| 105 |
|
} |
| 106 |
|
|