| Total Complexity | 3 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | private ListenerProviderInterface&MockObject $listenerProvider; |
||
|
|
|||
| 20 | |||
| 21 | public function setUp(): void |
||
| 22 | { |
||
| 23 | $this->listenerProvider = $this->getMockForAbstractClass(ListenerProviderInterface::class); |
||
| 24 | } |
||
| 25 | |||
| 26 | public function testImplementsEventDispatcherInterface(): void |
||
| 27 | { |
||
| 28 | $eventDispatcher = new ImmutableEventDispatcher($this->listenerProvider); |
||
| 29 | |||
| 30 | $this->assertInstanceOf(EventDispatcherInterface::class, $eventDispatcher); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function testDispatchOfInternalEventDispatcher(): void |
||
| 34 | { |
||
| 35 | $eventDispatcher = new ImmutableEventDispatcher($this->listenerProvider); |
||
| 36 | |||
| 37 | $this->listenerProvider->expects($this->once()) |
||
| 38 | ->method('getListenersForEvent') |
||
| 39 | ->willReturn([]); |
||
| 40 | |||
| 41 | $eventDispatcher->dispatch(new \stdClass()); |
||
| 42 | } |
||
| 43 | } |
||
| 44 |