| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public function testCreateService() |
||
| 23 | { |
||
| 24 | $serviceLocator = new ServiceLocatorDummy($this); |
||
| 25 | |||
| 26 | $optionsStub = $this->getMockBuilder('DmFileman\Helper\Options') |
||
| 27 | ->setMethods(['getThumbsOptions']) |
||
| 28 | ->disableOriginalConstructor() |
||
| 29 | ->getMock(); |
||
| 30 | $optionsStub->expects($this->any())->method('getThumbsOptions')->willReturn([]); |
||
| 31 | $serviceLocator->set('DmFileman\Helper\Options', $optionsStub); |
||
| 32 | |||
| 33 | $imagineStub = $this->getMockBuilder('Imagine\Gd\Imagine') |
||
| 34 | ->setMethods([]) |
||
| 35 | ->disableAutoload() |
||
| 36 | ->getMock(); |
||
| 37 | $serviceLocator->set('Imagine\Gd\Imagine', $imagineStub); |
||
| 38 | |||
| 39 | $result = $this->sut->createService($serviceLocator); |
||
| 40 | |||
| 41 | $this->assertInstanceOf('DmFileman\Service\Thumbnailer\Thumbnailer', $result); |
||
| 42 | } |
||
| 43 | } |
||
| 44 |