Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | public function testEvent(): void |
||
23 | { |
||
24 | $l = new ListenerRegistry(); |
||
25 | $l->addListener(function (LogEvent $event): void { |
||
26 | $this->assertSame('error', $event->getMessage()); |
||
27 | $this->assertSame('default', $event->getChannel()); |
||
28 | $this->assertSame(LogLevel::CRITICAL, $event->getLevel()); |
||
29 | }); |
||
30 | |||
31 | $f = new LogFactory($l); |
||
32 | |||
33 | $l = $f->getLogger('default'); |
||
34 | |||
35 | $l->critical('error'); |
||
36 | } |
||
38 |