Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | protected function getCommandTester(string $commandName, array $options = []): CommandTester |
||
31 | { |
||
32 | if (!$command = $this->getApplication()->find($commandName)) { |
||
33 | throw new RuntimeException( |
||
34 | sprintf('Please register the % command before attempting to test it.', $commandName) |
||
35 | ); |
||
36 | } |
||
37 | $commandTester = new CommandTester($command); |
||
38 | $commandTester->execute(['command' => $commandName], $options); |
||
39 | return $commandTester; |
||
40 | } |
||
52 |