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


PHP PHPUnit_Extensions_Database_DataSet_ITable::getRowCount方法代码示例

本文整理汇总了PHP中PHPUnit_Extensions_Database_DataSet_ITable::getRowCount方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Extensions_Database_DataSet_ITable::getRowCount方法的具体用法?PHP PHPUnit_Extensions_Database_DataSet_ITable::getRowCount怎么用?PHP PHPUnit_Extensions_Database_DataSet_ITable::getRowCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PHPUnit_Extensions_Database_DataSet_ITable的用法示例。


在下文中一共展示了PHPUnit_Extensions_Database_DataSet_ITable::getRowCount方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: saveTable

 /**
  * @param PHPUnit_Extensions_Database_DataSet_ITable $table
  */
 protected function saveTable(PHPUnit_Extensions_Database_DataSet_ITable $table)
 {
     $rowCount = $table->getRowCount();
     $this->startTable($table);
     for ($i = 0; $i < $rowCount; $i++) {
         $this->row($table->getRow($i), $table);
     }
     $this->endTable($table);
 }
开发者ID:nizarbey,项目名称:phpunit-all-in-one,代码行数:12,代码来源:Abstract.php

示例2: addTableRows

 /**
  * Adds the rows in the passed table to the current table.
  *
  * @param PHPUnit_Extensions_Database_DataSet_ITable $table
  */
 public function addTableRows(PHPUnit_Extensions_Database_DataSet_ITable $table)
 {
     $tableColumns = $this->getTableMetaData()->getColumns();
     $rowCount = $table->getRowCount();
     for ($i = 0; $i < $rowCount; $i++) {
         $newRow = array();
         foreach ($tableColumns as $columnName) {
             $newRow[$columnName] = $table->getValue($i, $columnName);
         }
         $this->addRow($newRow);
     }
 }
开发者ID:EmmanuelFernando,项目名称:rapport-stock-control,代码行数:17,代码来源:DefaultTable.php

示例3: loadData

 /**
  * Loads data into local data table if it's not already loaded
  */
 protected function loadData()
 {
     if ($this->data === NULL) {
         $data = array();
         for ($row = 0; $row < $this->originalTable->getRowCount(); $row++) {
             $tRow = array();
             foreach ($this->getTableMetaData()->getColumns() as $col) {
                 $tRow[$col] = $this->getValue($row, $col);
             }
             $data[$row] = $tRow;
         }
         $this->data = $data;
     }
 }
开发者ID:kentonquatman,项目名称:portfolio,代码行数:17,代码来源:TableFilter.php

示例4: matches

 /**
  * Asserts that the given table matches this table.
  *
  * @param PHPUnit_Extensions_Database_DataSet_ITable $other
  */
 public function matches(PHPUnit_Extensions_Database_DataSet_ITable $other)
 {
     $thisMetaData = $this->getTableMetaData();
     $otherMetaData = $other->getTableMetaData();
     if (!$thisMetaData->matches($otherMetaData) || $this->getRowCount() != $other->getRowCount()) {
         return FALSE;
     }
     $columns = $thisMetaData->getColumns();
     $rowCount = $this->getRowCount();
     for ($i = 0; $i < $rowCount; $i++) {
         foreach ($columns as $columnName) {
             if ($this->getValue($i, $columnName) != $other->getValue($i, $columnName)) {
                 return FALSE;
             }
         }
     }
     return TRUE;
 }
开发者ID:DaveNascimento,项目名称:civicrm-packages,代码行数:23,代码来源:AbstractTable.php

示例5: getRowCount

 /**
  * Returns the number of rows in this table.
  *
  * @return int
  */
 public function getRowCount()
 {
     return $this->originalTable->getRowCount();
 }
开发者ID:nblackman,项目名称:pimcore,代码行数:9,代码来源:TableFilter.php

示例6: startTable

 /**
  * Override to save the start of a table.
  *
  * @param PHPUnit_Extensions_Database_DataSet_ITable $table
  */
 protected function startTable(PHPUnit_Extensions_Database_DataSet_ITable $table)
 {
     if ($table->getRowCount() == 0) {
         fwrite($this->fh, "\t<{$table->getTableMetaData()->getTableName()} />\n");
     }
 }
开发者ID:robhinks,项目名称:dbunit,代码行数:11,代码来源:FlatXml.php

示例7: assertEquals

 /**
  * Asserts that the given table matches this table.
  *
  * @param PHPUnit_Extensions_Database_DataSet_ITable $other
  */
 public function assertEquals(PHPUnit_Extensions_Database_DataSet_ITable $other)
 {
     $thisMetaData = $this->getTableMetaData();
     $otherMetaData = $other->getTableMetaData();
     $thisMetaData->assertEquals($otherMetaData);
     if ($this->getRowCount() != $other->getRowCount()) {
         throw new Exception("Expected row count of {$this->getRowCount()}, has a row count of {$other->getRowCount()}");
     }
     $columns = $thisMetaData->getColumns();
     for ($i = 0; $i < $this->getRowCount(); $i++) {
         foreach ($columns as $columnName) {
             if ($this->getValue($i, $columnName) != $other->getValue($i, $columnName)) {
                 throw new Exception("Expected value of {$this->getValue($i, $columnName)} for row {$i} column {$columnName}, has a value of {$other->getValue($i, $columnName)}");
             }
         }
     }
     return TRUE;
 }
开发者ID:amptools-net,项目名称:midori-php,代码行数:23,代码来源:ReplacementTable.php


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