示例#1
0
 /**
  * Returns the formatted debug output.
  *
  * @return string
  */
 public function generateOutput()
 {
     if (is_null($this->formatter)) {
         $this->formatter = new ezcDebugHtmlFormatter();
     }
     return $this->formatter->generateOutput($this->writer->getStructure(), $this->timer->getTimeData());
 }
示例#2
0
 public function testMultipleRunningTimers()
 {
     $timer = new ezcDebugTimer();
     $timer->startTimer("Ray", "Local", "host");
     $timer->startTimer("Ray2", "Local", "host");
     $timer->startTimer("Ray3", "Local", "bla");
     $this->assertEquals(false, $timer->stopTimer("hehe"));
     $timer->stopTimer("Ray2");
     $timer->stopTimer("Ray3");
     $timer->stopTimer("Ray");
     $structure = $timer->getTimeData();
     $this->assertEquals(3, count($structure));
     // Expected order?
     $this->assertEquals("Ray2", $structure[0]->name);
     $this->assertEquals("Ray3", $structure[1]->name);
     $this->assertEquals("Ray", $structure[2]->name);
 }