Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function testCreateFromDomainEvent() |
||
17 | { |
||
18 | $serializer = SerializerBuilder::create()->build(); |
||
19 | $managerRegistry = $this->createMock(ManagerRegistry::class); |
||
20 | $managerRegistry->method('getManagerForClass')->willReturn(null); |
||
21 | $paginator = $this->createMock(PaginatorInterface::class); |
||
22 | |||
23 | $domainEvent = new PaymentCreated(new Payment()); |
||
24 | |||
25 | $expectedEvent = new Event($domainEvent->getName(), $serializer->serialize($domainEvent, 'json')); |
||
26 | |||
27 | $eventRepository = new EventRepository($managerRegistry, $paginator, 'class', $serializer); |
||
28 | |||
29 | $this->assertEquals($expectedEvent, $eventRepository->createFromDomainEvent($domainEvent)); |
||
30 | } |
||
31 | } |
||
32 |