Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
29 | public function testExecuteListsCommands() |
||
30 | { |
||
31 | // Arrange |
||
32 | $command = new ListCommand($this->givenAFactoryWithTemplateNames(['default', 'second'])); |
||
|
|||
33 | |||
34 | $expectedOutput = <<<TXT |
||
35 | Available templates: |
||
36 | * default |
||
37 | * second |
||
38 | |||
39 | |||
40 | TXT; |
||
41 | $expectedOutput = str_replace("\n", PHP_EOL, $expectedOutput); |
||
42 | |||
43 | // Act |
||
44 | $commandTester = new CommandTester($command); |
||
45 | $commandTester->execute([], ['decorated' => false]); |
||
46 | |||
47 | // Assert |
||
48 | $this->assertSame($expectedOutput, $commandTester->getDisplay()); |
||
49 | } |
||
50 | |||
66 |
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.