| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | public function testThatExceptionIsPropagated() |
||
| 12 | { |
||
| 13 | $action = new ExecuteCode( |
||
| 14 | 'Do something', |
||
| 15 | function ($config, $input, $output) { |
||
| 16 | $this->assertInstanceOf(Config::class, $config); |
||
| 17 | $this->assertInstanceOf(Input\InputInterface::class, $input); |
||
| 18 | $this->assertInstanceOf(Output\OutputInterface::class, $output); |
||
| 19 | |||
| 20 | throw new \RuntimeException('Testing'); |
||
| 21 | } |
||
| 22 | ); |
||
| 23 | |||
| 24 | $action->setConfig( |
||
| 25 | $this->getMockBuilder(Config::class) |
||
| 26 | ->disableOriginalConstructor() |
||
| 27 | ->getMock() |
||
| 28 | ); |
||
| 29 | |||
| 30 | $this->setExpectedException(\RuntimeException::class, 'Testing'); |
||
| 31 | |||
| 32 | $action->execute(new Input\StringInput(''), new Output\NullOutput()); |
||
| 33 | } |
||
| 34 | } |
||
| 35 |