Skip to content

Commit 6284ef1

Browse files
authored
[9.x] Improve test for getDefaultDriver method in LogManager Class (#43993)
1 parent e86e8ce commit 6284ef1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/Log/LogManagerTest.php

+14
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,20 @@ public function testLogManagerCachesLoggerInstances()
3131
$this->assertSame($logger1, $logger2);
3232
}
3333

34+
public function testLogManagerGetDefaultDriver()
35+
{
36+
$config = $this->app['config'];
37+
$config->set('logging.default', 'single');
38+
39+
$manager = new LogManager($this->app);
40+
$this->assertEmpty($manager->getChannels());
41+
42+
//we don't specify any channel name
43+
$manager->channel();
44+
$this->assertCount(1, $manager->getChannels());
45+
$this->assertEquals('single', $manager->getDefaultDriver());
46+
}
47+
3448
public function testStackChannel()
3549
{
3650
$config = $this->app['config'];

0 commit comments

Comments
 (0)