public function testBuildTable() { $entityManagerMock = $this->getMock('Doctrine\\Common\\Persistence\\ObjectManager'); $eventDispatcherMock = $this->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface'); $columnFactoryMock = $this->getMock('EMC\\TableBundle\\Table\\Column\\ColumnFactoryInterface'); $builder = new TableBuilder($entityManagerMock, $eventDispatcherMock, $columnFactoryMock, $this->fooType, $this->defaultColumnOptions, null, array()); $options = array('a' => 1, 'b' => '2'); $expectedBuilder = clone $builder; $this->decorator->buildTable($builder, $options); $this->fooType->buildTable($expectedBuilder, $options); $this->assertEquals($expectedBuilder, $builder); }