public function LoggerInterfaceTest::testContextExceptionKeyCanBeExceptionOrOtherValues

File

drupal/core/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php, line 107

Class

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

Namespace

Psr\Log\Test

Code

public function testContextExceptionKeyCanBeExceptionOrOtherValues() {
  $this
    ->getLogger()
    ->warning('Random message', array(
    'exception' => 'oops',
  ));
  $this
    ->getLogger()
    ->critical('Uncaught Exception!', array(
    'exception' => new \LogicException('Fail'),
  ));
}