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