Conditions | 2 |
Paths | 2 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function testListener() |
||
17 | { |
||
18 | if (!class_exists(ConsoleErrorEvent::class)) { |
||
19 | // Nothing to test |
||
20 | return; |
||
21 | } |
||
22 | |||
23 | $logger = $this->createMock(LoggerInterface::class); |
||
24 | $logger->expects($this->once())->method('error')->willReturn(true); |
||
25 | $subscriber = new ConsoleExceptionSubscriber($logger); |
||
26 | |||
27 | $command = new ApplyAclCommand(); |
||
28 | $exception = new Exception(); |
||
29 | |||
30 | $input = $this->createMock(InputInterface::class); |
||
31 | $output = $this->createMock(OutputInterface::class); |
||
32 | $event = new ConsoleErrorEvent($input, $output, $exception, $command); |
||
33 | |||
34 | $subscriber->onConsoleError($event); |
||
35 | } |
||
36 | } |