public function test_getOrderField() { $this->_datatable->setEntity('Ali\\DatatableBundle\\Entity\\Product', 'p')->setFields(array("title" => 'p.name', "_identifier_" => 'p.id'))->setOrder('p.id', 'asc'); $this->assertInternalType('string', $this->_datatable->getOrderField()); }
public function testSetOrder() { $this->_datatable->setOrder('p.id', 'asc'); $this->assertEquals('p.id', $this->_datatable->getOrderField()); $this->assertEquals('asc', $this->_datatable->getOrderType()); }