Conditions | 1 |
Paths | 1 |
Total Lines | 23 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
33 | public function testServiceHandlers() |
||
34 | { |
||
35 | $serviceManager = new ServiceManager(); |
||
36 | $serviceManager->setService('config', [ |
||
37 | 'logger' => [ |
||
38 | 'handlers' => [ |
||
39 | NoopHandler::class |
||
40 | ], |
||
41 | ], |
||
42 | 'dependencies' => [ |
||
43 | 'factories' => [ |
||
44 | NoopHandler::class => InvokableFactory::class |
||
45 | ], |
||
46 | ], |
||
47 | ]); |
||
48 | |||
49 | $loggerFactory = new \SlayerBirden\DataFlowServer\Logger\AppLoggerFactory(); |
||
50 | |||
51 | $logger = $loggerFactory($serviceManager); |
||
52 | |||
53 | $handlers = $logger->getHandlers(); |
||
54 | $this->assertCount(1, $handlers); |
||
55 | } |
||
56 | } |
||
57 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.