| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public function testSetLoggerResetsStack() |
||
| 22 | { |
||
| 23 | /** @var LoggerInterface $logger */ |
||
| 24 | $logger = $this->createMock(LoggerInterface::class); |
||
| 25 | |||
| 26 | $handler = new MonologErrorHandler(); |
||
| 27 | $handler->pushLogger($logger)->pushLogger($logger); |
||
| 28 | $this->assertCount(2, $handler->getLoggers(), 'Loggers are pushed to the stack'); |
||
| 29 | |||
| 30 | $handler->setLogger($logger); |
||
|
|
|||
| 31 | $this->assertCount(1, $handler->getLoggers(), 'setLogger resets stack and pushes'); |
||
| 32 | |||
| 33 | $handler->setLoggers([]); |
||
| 34 | $this->assertCount(0, $handler->getLoggers(), 'setLoggers overwrites all configured loggers'); |
||
| 35 | } |
||
| 37 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.