| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 12 |
| 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(ConfigInterface::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($this->getConfigMock()); |
||
|
|
|||
| 25 | |||
| 26 | $this->setExpectedException(\RuntimeException::class, 'Testing'); |
||
| 27 | |||
| 28 | $action->execute(new Input\StringInput(''), new Output\NullOutput()); |
||
| 29 | |||
| 30 | $this->assertSame('Do something (ExecuteCode)', $action->getName()); |
||
| 31 | } |
||
| 32 | |||
| 43 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.