Exemple #1
0
 public function testSetLogger()
 {
     // This test assumes that the debug output defaults to off.
     $file_name = getLogFileName();
     $message = 'The sky is the daily bread of the eyes.';
     setOutputDestination($file_name);
     $this->runner->getLogger()->debug($message);
     $output = retrieveOutput($file_name);
     $this->assertFalse(strpos($output, $message) !== false);
     $this->runner->setLogger(['debug' => true, 'format' => 'json']);
     $this->runner->getLogger()->debug($message);
     $output = retrieveOutput($file_name);
     $this->assertTrue(strpos($output, $message) !== false);
     resetOutputDestination($file_name);
 }