Conditions | 1 |
Paths | 1 |
Total Lines | 28 |
Code Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function testInvoke() |
||
16 | { |
||
17 | $syncOptionMock = \Mockery::mock(SyncOptions::class); |
||
18 | $syncServiceMock = \Mockery::mock(SyncService::class); |
||
19 | $loggerMock = \Mockery::mock(LoggerInterface::class); |
||
20 | |||
21 | $this->getContainer() |
||
22 | ->shouldReceive('get') |
||
23 | ->once() |
||
24 | ->withArgs([SyncOptions::class]) |
||
25 | ->andReturn($syncOptionMock); |
||
26 | |||
27 | $this->getContainer() |
||
28 | ->shouldReceive('get') |
||
29 | ->once() |
||
30 | ->withArgs([SyncService::class]) |
||
31 | ->andReturn($syncServiceMock); |
||
32 | |||
33 | $this->getContainer() |
||
34 | ->shouldReceive('get') |
||
35 | ->once() |
||
36 | ->withArgs(['Logger']) |
||
37 | ->andReturn($loggerMock); |
||
38 | |||
39 | $factory = new SyncCommandFactory(); |
||
40 | $instance = $factory->__invoke($this->getContainer(), SyncCommand::class); |
||
41 | |||
42 | $this->assertInstanceOf(SyncCommand::class, $instance); |
||
43 | } |
||
45 |