/** * Update the label of the message holding the profile info. * * @return void */ protected function updateMessageLabel() { if (!$this->_message) { return; } $this->_message->setLabel(str_replace(array('%label%', '%totalCount%', '%totalDuration%'), array($this->_label, $this->getTotalNumQueries(), (string) round($this->_totalElapsedTime, 5)), $this->_label_template)); }
/** * @group ZF-6396 */ public function testTableMessage2() { $this->_setupWithoutFrontController(); $channel = Channel\HttpHeaders::getInstance(); $protocol = $channel->getProtocol(FirePhp::PROTOCOL_URI); $table = new FirePhp\TableMessage('TestMessage'); $table->setHeader(array('col1','col2')); $table->setBuffered(true); FirePhp::send($table); $cell = new \ArrayObject(); $cell->append("item1"); $cell->append("item2"); $table->addRow(array("row1", $cell)); Channel\HttpHeaders::getInstance()->flush(); $messages = $protocol->getMessages(); $this->assertEquals($messages[FirePhp::STRUCTURE_URI_FIREBUGCONSOLE] [FirePhp::PLUGIN_URI][0], '[{"Type":"TABLE","Label":"TestMessage"},[["col1","col2"],["row1",{"__className":"ArrayObject","undeclared:0":"item1","undeclared:1":"item2"}]]]'); }