/** * @covers Fuel\Common\Table::getRows * @covers Fuel\Common\Table::addRow * @covers Fuel\Common\Table::createRow * @group Common */ public function testAddRow() { $rowCount = 10; for ($i = 0; $i < $rowCount; $i++) { $this->object->createRow()->addRow(); } $this->assertEquals($rowCount, count($this->object->getRows())); }
/** * Renders the main body rows for the table * * @param Table $table * * @return array */ protected function buildRows(Table $table) { //Generate each row $rows = array(); foreach ($table->getRows() as $row) { //Build the cells for each row $cells = array(); foreach ($row as $cell) { $cells[] = $this->cell($cell); } $rows[] = $this->row($row, $cells); } return $rows; }