| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function serviceIsCreatedExtractingConnectionFromEntityManager() |
||
| 28 | { |
||
| 29 | $em = $this->prophesize(EntityManager::class); |
||
| 30 | $conn = $this->prophesize(Connection::class); |
||
| 31 | |||
| 32 | $getConnection = $em->getConnection()->willReturn($conn->reveal()); |
||
| 33 | |||
| 34 | $sm = new ServiceManager(['services' => [ |
||
| 35 | 'Logger_Shlink' => $this->prophesize(LoggerInterface::class)->reveal(), |
||
| 36 | AppOptions::class => $this->prophesize(AppOptions::class)->reveal(), |
||
| 37 | EntityManager::class => $em->reveal(), |
||
| 38 | ]]); |
||
| 39 | |||
| 40 | $instance = ($this->factory)($sm, ''); |
||
| 41 | |||
| 42 | $this->assertInstanceOf(Action\HealthAction::class, $instance); |
||
| 43 | $getConnection->shouldHaveBeenCalledOnce(); |
||
| 44 | } |
||
| 46 |