public function testAddFields() { $fields = array("title" => 'p.name', "_identifier_" => 'p.id'); $this->_datatable->setFields($fields); $this->_datatable->addFields(array('description' => 'p.description')); $this->assertEquals($fields + array('description' => 'p.description'), $this->_datatable->getFields()); }
public function test_getFields() { $this->_datatable->setEntity('Ali\\DatatableBundle\\Entity\\Product', 'p')->setFields(array("title" => 'p.name', "_identifier_" => 'p.id')); $this->assertInternalType('array', $this->_datatable->getFields()); }