Esempio n. 1
0
 /**
  * Tests Log_FirePHP in Zend_Log compatibility mode
  */
 public function testZendCompatible()
 {
     $this->Log_FirePHP->zendCompatible = true;
     $this->Log_FirePHP->info('This is a test');
     $this->assertEquals('["INFO",' . json_encode('This is a test') . "],", Q\HTTP::header_getValue('X-FirePHP-Data-3' . str_pad($this->getCounter(), 11, '0', STR_PAD_LEFT)));
     $this->Log_FirePHP->warn('Yet another "test"');
     $this->assertEquals('["WARN",' . json_encode('Yet another "test"') . "],", Q\HTTP::header_getValue('X-FirePHP-Data-3' . str_pad($this->getCounter(), 11, '0', STR_PAD_LEFT)));
 }
Esempio n. 2
0
 /**
  * Tests Log_FirePHP::fb() with type TABLE
  */
 public function testFb_type_TABLE()
 {
     Log_FirePHP::fb(array(array('SQL Statement', 'Time', 'Result'), array('SELECT * FROM Foo', '0.02', array('row1', 'row2')), array('SELECT * FROM Bar', '0.04', array('row1', 'row2'))), '2 SQL queries took 0.06 seconds', Log_FirePHP::TABLE);
     $this->assertEquals('["TABLE",' . json_encode(array('2 SQL queries took 0.06 seconds', array(array('SQL Statement', 'Time', 'Result'), array('SELECT * FROM Foo', '0.02', array('row1', 'row2')), array('SELECT * FROM Bar', '0.04', array('row1', 'row2'))))) . "],", Q\HTTP::header_getValue('X-FirePHP-Data-3' . str_pad($this->getCounter(), 11, '0', STR_PAD_LEFT)));
 }