You are here

public function LoggerInterfaceTest::testContextReplacement in Lockr 7.3

File

vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php, line 76

Class

LoggerInterfaceTest
Provides a base test class for ensuring compliance with the LoggerInterface.

Namespace

Psr\Log\Test

Code

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());
}