/** * @covers Fuel\Common\Table::createRow * @covers Fuel\Common\Table::addRow * @covers Fuel\Common\Table::getFooterRows * @group Common */ public function testAddFooter() { $this->object->createRow(Table\EnumRowType::Footer)->addRow(); $this->assertEquals(1, count($this->object->getFooterRows())); }
/** * Renders the footer rows for the table * * @param Table $table * * @return array */ protected function buildFooters(Table $table) { //Generate each row $rows = array(); foreach ($table->getFooterRows() as $row) { //Build the cells for each row $cells = array(); foreach ($row as $cell) { $cells[] = $this->footerCell($cell); } $rows[] = $this->footerRow($row, $cells); } return $rows; }