public function LoggerInterfaceTest::testLogsAtAllLevels in Service Container 7.2
Same name and namespace in other branches
- 7 lib/Psr/Log/Test/LoggerInterfaceTest.php \Psr\Log\Test\LoggerInterfaceTest::testLogsAtAllLevels()
@dataProvider provideLevelsAndMessages
File
- lib/
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());
}