|
8 | 8 | use PHPFastCGI\Test\FastCGIDaemon\Helper\Mocker\MockDaemon; |
9 | 9 | use PHPFastCGI\Test\FastCGIDaemon\Helper\Mocker\MockDaemonFactory; |
10 | 10 | use PHPFastCGI\Test\FastCGIDaemon\Helper\Mocker\MockKernel; |
| 11 | +use PHPUnit\Framework\TestCase; |
11 | 12 | use Symfony\Component\Console\Input\ArrayInput; |
12 | 13 | use Symfony\Component\Console\Logger\ConsoleLogger; |
13 | 14 | use Symfony\Component\Console\Output\NullOutput; |
14 | 15 |
|
15 | 16 | /** |
16 | 17 | * Tests the daemon run command. |
17 | 18 | */ |
18 | | -class DaemonRunCommandTest extends \PHPUnit_Framework_TestCase |
| 19 | +class DaemonRunCommandTest extends TestCase |
19 | 20 | { |
20 | 21 | /** |
21 | 22 | * Tests that the command options are configured properly. |
@@ -95,15 +96,14 @@ public function testDaemonOptions() |
95 | 96 | /** |
96 | 97 | * Test with only the host option set. An Invalid argument exception should |
97 | 98 | * be thrown if the host option is supplied without the port optional also. |
98 | | - * |
99 | | - * @expectedException \InvalidArgumentException |
100 | 99 | */ |
101 | 100 | public function testHostOptionOnly() |
102 | 101 | { |
103 | 102 | $context = $this->createTestingContext([]); |
104 | 103 |
|
105 | 104 | $input = new ArrayInput(['--host' => 'foo']); |
106 | 105 |
|
| 106 | + $this->expectException(\InvalidArgumentException::class); |
107 | 107 | $context['command']->run($input, new NullOutput()); |
108 | 108 | } |
109 | 109 |
|
@@ -149,12 +149,11 @@ public function testShutdown() |
149 | 149 |
|
150 | 150 | /** |
151 | 151 | * Test flag shutdown with no daemon. |
152 | | - * |
153 | | - * @expectedException \RuntimeException |
154 | 152 | */ |
155 | 153 | public function testShutdownNoDaemon() |
156 | 154 | { |
157 | 155 | $command = new DaemonRunCommand(new MockKernel(), new MockDriverContainer()); |
| 156 | + $this->expectException(\RuntimeException::class); |
158 | 157 | $command->flagShutdown(); |
159 | 158 | } |
160 | 159 |
|
|
0 commit comments