You are here

public function LoggerInterfaceTest::testContextCanContainAnything in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php \Psr\Log\Test\LoggerInterfaceTest::testContextCanContainAnything()

File

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

Class

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

Namespace

Psr\Log\Test

Code

public function testContextCanContainAnything() {
  $context = array(
    'bool' => true,
    'null' => null,
    'string' => 'Foo',
    'int' => 0,
    'float' => 0.5,
    'nested' => array(
      'with object' => new DummyTest(),
    ),
    'object' => new \DateTime(),
    'resource' => fopen('php://memory', 'r'),
  );
  $this
    ->getLogger()
    ->warning('Crazy context data', $context);
}