public function testClearColumns() { $this->engine->addColumn('foo', 'Bar'); $this->assertInstanceOf('Chumper\\Datatable\\Columns\\TextColumn', $this->engine->getColumn('foo')); $this->engine->clearColumns(); $this->assertEquals(array(), $this->engine->getOrder()); }
public function testTake() { Input::replace(array('iDisplayLength' => 1)); $engine = new CollectionEngine(new Collection($this->getTestArray())); $engine->addColumn($this->getTestColumns()); $engine->setAliasMapping(); $engine->make(); $should = array(array('id' => 'foo')); $this->assertEquals($should, $engine->getArray()); }