Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public function testFactoryProcessesWithoutErrors() |
||
15 | { |
||
16 | $serviceLocator = $this->getMock('Zend\ServiceManager\ServiceLocatorInterface'); |
||
17 | $services = [ |
||
18 | 'FlexiOptions' => $this->getMock('JhFlexiTime\Options\ModuleOptions'), |
||
19 | ]; |
||
20 | |||
21 | $serviceLocator |
||
22 | ->expects($this->any()) |
||
23 | ->method('get') |
||
24 | ->will( |
||
25 | $this->returnCallback( |
||
26 | function ($serviceName) use ($services) { |
||
27 | return $services[$serviceName]; |
||
28 | } |
||
29 | ) |
||
30 | ); |
||
31 | |||
32 | $factory = new PeriodServiceFactory(); |
||
33 | $this->assertInstanceOf('JhFlexiTime\Service\PeriodService', $factory->createService($serviceLocator)); |
||
34 | } |
||
35 | } |
||
36 |