| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 42 | public function runInvokesContainerAndListenerWithEvent(): void |
||
| 43 | { |
||
| 44 | $invoked = false; |
||
| 45 | $container = $this->prophesize(ContainerInterface::class); |
||
| 46 | $listener = function (object $event) use (&$invoked) { |
||
| 47 | $invoked = true; |
||
| 48 | Assert::assertSame($event, $this->event); |
||
| 49 | }; |
||
| 50 | |||
| 51 | $getListener = $container->get($this->listenerName)->willReturn($listener); |
||
| 52 | |||
| 53 | $this->task->run($container->reveal()); |
||
| 54 | |||
| 55 | $this->assertTrue($invoked); |
||
| 56 | $getListener->shouldHaveBeenCalledOnce(); |
||
| 57 | } |
||
| 59 |