/** * Generates a "correct" table tag to contain the rendered rows * * @param Table $table * @param array $rows * @param array $headers * @param array $footers * * @return string */ protected function container(Table $table, array $rows, array $headers, array $footers) { $html = '<table'; $this->addAttributes($html, $table->getAttributes()); $html .= '><thead>'; $html .= implode("\n", $headers); $html .= '</thead><tbody>'; $html .= implode("\n", $rows); $html .= '</tbody><tfoot>'; $html .= implode("\n", $footers); $html .= '</tfoot></table>'; return $html; }
/** * @covers Fuel\Common\Table::setAttributes * @covers Fuel\Common\Table::getAttributes * @group Common */ public function testSetGetAttributes() { $attributes = array('class' => 'table', 'id' => 'test'); $this->object->setAttributes($attributes); $this->assertEquals($attributes, $this->object->getAttributes()); }