public function LoggerInterfaceTest::testLogsAtAllLevels in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php \Psr\Log\Test\LoggerInterfaceTest::testLogsAtAllLevels()
@dataProvider provideLevelsAndMessages
File
- vendor/
psr/ log/ Psr/ Log/ Test/ LoggerInterfaceTest.php, line 36
Class
- LoggerInterfaceTest
- Provides a base test class for ensuring compliance with the LoggerInterface
Namespace
Psr\Log\TestCode
public function testLogsAtAllLevels($level, $message) {
$logger = $this
->getLogger();
$logger
->{$level}($message, array(
'user' => 'Bob',
));
$logger
->log($level, $message, array(
'user' => 'Bob',
));
$expected = array(
$level . ' message of level ' . $level . ' with context: Bob',
$level . ' message of level ' . $level . ' with context: Bob',
);
$this
->assertEquals($expected, $this
->getLogs());
}