| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function testHandlers() |
||
| 15 | { |
||
| 16 | $serviceManager = new ServiceManager(); |
||
| 17 | $serviceManager->setService('config', [ |
||
| 18 | 'logger' => [ |
||
| 19 | 'handlers' => [ |
||
| 20 | new NoopHandler() |
||
| 21 | ], |
||
| 22 | ], |
||
| 23 | ]); |
||
| 24 | |||
| 25 | $loggerFactory = new \SlayerBirden\DataFlowServer\Logger\AppLoggerFactory(); |
||
| 26 | |||
| 27 | $logger = $loggerFactory($serviceManager); |
||
| 28 | |||
| 29 | $handlers = $logger->getHandlers(); |
||
| 30 | $this->assertCount(1, $handlers); |
||
| 31 | } |
||
| 32 | |||
| 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.