public function test_table() { $collection = Jam::all('test_city')->load_fields(array('id' => 1, 'name' => 'London')); $items = array('name' => Tart::column()); $table = Tart::table($collection, $items); $this->assertInstanceOf('Tart_Table', $table); $this->assertEquals($collection, $table->collection()); $this->assertEquals($items, $table->items()); }
public function columns($name = NULL, $value = NULL) { if (!$this->_content) { $this->content(Tart::table()); } if (is_array($name) or $value !== NULL) { $this->content()->columns($name, $value); return $this; } else { return $this->content()->columns($name, $value); } }