public function LoggerInterfaceTest::testObjectCastToString

File

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

Class

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

Namespace

Psr\Log\Test

Code

public function testObjectCastToString() {
  $dummy = $this
    ->getMock('Psr\\Log\\Test\\DummyTest', array(
    '__toString',
  ));
  $dummy
    ->expects($this
    ->once())
    ->method('__toString')
    ->will($this
    ->returnValue('DUMMY'));
  $this
    ->getLogger()
    ->warning($dummy);
}