本文整理汇总了PHP中Zend_Wildfire_Plugin_FirePhp_TableMessage::getLabel方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Wildfire_Plugin_FirePhp_TableMessage::getLabel方法的具体用法?PHP Zend_Wildfire_Plugin_FirePhp_TableMessage::getLabel怎么用?PHP Zend_Wildfire_Plugin_FirePhp_TableMessage::getLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Wildfire_Plugin_FirePhp_TableMessage
的用法示例。
在下文中一共展示了Zend_Wildfire_Plugin_FirePhp_TableMessage::getLabel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testTableMessage
/**
* @group ZF-5742
*/
public function testTableMessage()
{
$table = new Zend_Wildfire_Plugin_FirePhp_TableMessage('TestMessage');
$this->assertEquals($table->getLabel(), 'TestMessage');
try {
$table->getLastRow();
$this->fail('Should throw exception when no rows exist');
} catch (Exception $e) {
// success
}
$row = array('col1', 'col2');
$this->assertEquals($table->getRowCount(), 0);
try {
$table->getRowAt(1);
$this->fail('Should throw exception as no rows present');
} catch (Exception $e) {
// success
}
try {
$table->setRowAt(1, array());
$this->fail('Should throw exception as no rows present');
} catch (Exception $e) {
// success
}
$table->addRow($row);
$this->assertEquals($table->getMessage(), array($row));
$this->assertEquals($table->getLastRow(), $row);
$this->assertEquals($table->getRowCount(), 1);
$table->addRow($row);
$this->assertEquals($table->getMessage(), array($row, $row));
$this->assertEquals($table->getRowCount(), 2);
$this->assertEquals($table->getLastRow(), $row);
try {
$table->getRowAt(2);
$this->fail('Should throw exception as index is out of bounds');
} catch (Exception $e) {
// success
}
try {
$table->setRowAt(2, array());
$this->fail('Should throw exception as index is out of bounds');
} catch (Exception $e) {
// success
}
$rowOld = $table->getRowAt(1);
$this->assertEquals($rowOld, $row);
$rowOld[1] = 'Column2';
$table->setRowAt(1, $rowOld);
$this->assertEquals($table->getRowAt(1), $rowOld);
$this->assertEquals($table->getLastRow(), $rowOld);
$this->assertEquals($table->getMessage(), array($row, $rowOld));
$header = array('hc1', 'hc2');
$table->setHeader($header);
$this->assertEquals($table->getMessage(), array($header, $row, $rowOld));
}