当前位置: 首页>>代码示例>>PHP>>正文


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怎么用?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));
 }
开发者ID:ThorstenSuckow,项目名称:conjoon,代码行数:58,代码来源:WildfireTest.php


注:本文中的Zend_Wildfire_Plugin_FirePhp_TableMessage::getLabel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。