public function LoggerInterfaceTest::testContextReplacement in Service Container 7
Same name and namespace in other branches
- 7.2 lib/Psr/Log/Test/LoggerInterfaceTest.php \Psr\Log\Test\LoggerInterfaceTest::testContextReplacement()
File
- lib/
Psr/ Log/ Test/ LoggerInterfaceTest.php, line 72
Class
- LoggerInterfaceTest
- Provides a base test class for ensuring compliance with the LoggerInterface
Namespace
Psr\Log\TestCode
public function testContextReplacement() {
$logger = $this
->getLogger();
$logger
->info('{Message {nothing} {user} {foo.bar} a}', array(
'user' => 'Bob',
'foo.bar' => 'Bar',
));
$expected = array(
'info {Message {nothing} Bob Bar a}',
);
$this
->assertEquals($expected, $this
->getLogs());
}