Esempio n. 1
0
 public function test_getEntityName()
 {
     $this->_datatable->setEntity('Ali\\DatatableBundle\\Entity\\Product', 'p')->setFields(array("title" => 'p.name', "_identifier_" => 'p.id'));
     $this->assertEquals('Ali\\DatatableBundle\\Entity\\Product', $this->_datatable->getEntityName());
 }
 public function testSetEntity()
 {
     $this->_datatable->setEntity('Ali\\DatatableBundle\\Tests\\TestBundle\\Entity\\Product', 'p');
     $this->assertEquals('Ali\\DatatableBundle\\Tests\\TestBundle\\Entity\\Product', $this->_datatable->getEntityName());
     $this->assertEquals('p', $this->_datatable->getEntityAlias());
 }