| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function testInvokeWillCreateAConsoleControllerInstance() |
||
| 16 | { |
||
| 17 | $containerMock = $this->createMock(ContainerInterface::class); |
||
| 18 | $commentTableMock = $this->createMock(CommentTable::class); |
||
| 19 | |||
| 20 | $consoleControllerFactory = new ConsoleControllerFactory(); |
||
| 21 | |||
| 22 | // Expectations |
||
| 23 | $containerMock->expects($this->once()) |
||
| 24 | ->method('get') |
||
| 25 | ->with(CommentTable::class) |
||
| 26 | ->willReturn($commentTableMock); |
||
| 27 | |||
| 28 | $controller = $consoleControllerFactory($containerMock, CommentController::class); |
||
| 29 | |||
| 30 | // Assertions |
||
| 31 | $this->assertInstanceOf(ConsoleController::class, $controller); |
||
| 32 | } |
||
| 33 | } |
||
| 34 |