log() public method

Log something using the configured logger callable (if available).
public log ( array $log )
$log array
示例#1
0
 public function testLog()
 {
     $conn = new Connection();
     $called = false;
     $conn->getConfiguration()->setLoggerCallable(function ($msg) use(&$called) {
         $called = $msg;
     });
     $conn->log(array('test'));
     $this->assertEquals(array('test'), $called);
 }
示例#2
0
 public function testLogShouldDoNothingWithoutLoggerCallable()
 {
     $conn = new Connection();
     $conn->log(array('test'));
     $this->assertNull($conn->getConfiguration()->getLoggerCallable());
 }