public function LoggerInterfaceTest::testLogsAtAllLevels in Lockr 7.3
@dataProvider provideLevelsAndMessages
File
- vendor/
psr/ log/ Psr/ Log/ Test/ LoggerInterfaceTest.php, line 40
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());
}