示例#1
0
 protected function setUp()
 {
     $this->entityManagerMock = $this->getMock('Doctrine\\Common\\Persistence\\ObjectManager');
     $this->eventDispatcherMock = $this->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface');
     $this->tableSessionMock = $this->getMock('EMC\\TableBundle\\Session\\TableSessionInterface');
     $this->columnFactoryMock = $this->getMock('EMC\\TableBundle\\Table\\Column\\ColumnFactoryInterface');
     $this->exportRegistryMock = $this->getMock('EMC\\TableBundle\\Table\\Export\\ExportRegistryInterface');
     $this->factory = new TableFactory($this->entityManagerMock, $this->eventDispatcherMock, $this->tableSessionMock, $this->columnFactoryMock, $this->exportRegistryMock, $this->defaultOptions, $this->defaultColumnOptions);
     $this->fooType = new Type\FooType();
     $this->tableSessionMock->expects($this->any())->method('restore')->with($this->fooType->getId())->will($this->returnValue(array('class' => get_class($this->fooType), 'options' => array(), 'data' => null)));
 }