Example #1
0
 /**
  * @runInSeparateProcess
  * @preserveGlobalState disabled
  */
 public function testFirephp()
 {
     $this->markTestSkipped('need install xdebug');
     $logger = new \Phalcon\Logger\Adapter\Firephp();
     $logger->getFormatter()->setShowBacktrace(false);
     $logger->info('info');
     $headers = xdebug_get_headers();
     $this->assertContains('X-Wf-Protocol-1: http://meta.wildfirehq.org/Protocol/JsonStream/0.2', $headers);
     $this->assertContains('X-Wf-1-Plugin-1: http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3', $headers);
     $this->assertContains('X-Wf-Structure-1: http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1', $headers);
     $this->assertContains('X-Wf-1-1-1-1: 35|[{"Type":"INFO","Label":"info"},""]|', $headers);
 }
<?php

$logger = new \Phalcon\Logger\Adapter\Firephp("");
$logger->log("This is a message");
$logger->log("This is an error", \Phalcon\Logger::ERROR);
$logger->error("This is another error");