Conditions | 1 |
Paths | 1 |
Total Lines | 27 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
12 | public function testCreateService() |
||
13 | { |
||
14 | $config = [ |
||
15 | 'zenddevelopertools' => [ |
||
16 | 'toolbar' => [ |
||
17 | 'enabled' => true |
||
18 | ] |
||
19 | ] |
||
20 | ]; |
||
21 | |||
22 | $serviceLocator = $this->getMockBuilder(ServiceLocatorInterface::class) |
||
23 | ->getMock(); |
||
24 | $pluginManager = $this->getMockBuilder(AbstractPluginManager::class) |
||
25 | ->disableOriginalConstructor() |
||
26 | ->getMock(); |
||
27 | |||
28 | $serviceLocator->expects(static::any())->method('get')->with('config')->willReturn($config); |
||
29 | |||
30 | $pluginManager->expects(static::once()) |
||
31 | ->method('getServiceLocator') |
||
32 | ->willReturn($serviceLocator); |
||
33 | |||
34 | $factory = new YumlControllerFactory(); |
||
35 | $controller = $factory->createService($pluginManager); |
||
36 | |||
37 | static::assertInstanceOf(YumlController::class, $controller); |
||
38 | } |
||
39 | } |
||
40 |