Exemple #1
0
 public function testCreateGridWithEmptyCollection()
 {
     $factory = new Factory();
     $collection = $this->getMock('Jfsimon\\Datagrid\\Model\\Data\\Collection', array(), array(), '', false);
     $collection->expects($this->once())->method('getPeek')->will($this->returnValue(null));
     $schema = $this->getMock('Jfsimon\\Datagrid\\Model\\Schema');
     $this->assertInstanceOf('Jfsimon\\Datagrid\\Model\\Component\\Grid', $factory->createGrid($collection, array('schema' => $schema)));
 }
Exemple #2
0
 private function getFactory()
 {
     $factory = new Factory();
     return $factory->removeExtension('label')->removeExtension('actions');
 }