Пример #1
0
 public function testBuildBodyViewEmptyData()
 {
     $builder = new TableBuilder($this->entityManagerMock, $this->eventDispatcherMock, $this->columnFactoryMock, $this->fooType, $this->defaultColumnOptions, array(), $this->resolvedOptions);
     $table = $builder->getTable();
     $view = array();
     $this->assertEquals(array(), $table->getType()->buildBodyView($view, $table));
 }
Пример #2
0
 public function testGetQueryResultStaticData()
 {
     $builder = new TableBuilder($this->entityManagerMock, $this->eventDispatcherMock, $this->columnFactoryMock, $this->fooType, $this->defaultColumnOptions, self::$rows, $this->resolvedOptions);
     $builder->add('id', 'text');
     $builder->add('name', 'text');
     $table = $builder->create();
     $queryResult = $builder->getQueryResult($table);
     $expectedQueryResult = new \EMC\TableBundle\Provider\QueryResult(self::$rows, 0);
     $this->assertEquals($queryResult, $expectedQueryResult);
 }