Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function testGet() |
||
16 | { |
||
17 | $id = 241; |
||
18 | $f1 = new AbcClass(); |
||
19 | |||
20 | $evm = $this->prophesize(EventDispatcherInterface::class); |
||
21 | $evm->dispatch(CrudEvents::READ, Argument::type(CollectionCrudEvent::class))->shouldBeCalled(); |
||
22 | |||
23 | $repository = $this->prophesize(ObjectRepository::class); |
||
24 | $repository->find(Argument::exact($id))->willReturn($f1)->shouldBeCalled(); |
||
25 | |||
26 | $controller = new ReadController($repository->reveal(), $evm->reveal()); |
||
27 | |||
28 | /** @var AbcClass $entity */ |
||
29 | $entity = $controller->getAction($id); |
||
30 | self::assertSame($f1, $entity); |
||
31 | } |
||
32 | } |
||
33 |