/** * Sets up this test case * @return void */ public function setUp() { $this->objectManager = $this->getMock('Tx_Extbase_Object_ObjectManagerInterface'); $this->query = new Tx_Extbase_Persistence_Query('someType'); $this->query->injectObjectManager($this->objectManager); $this->querySettings = $this->getMock('Tx_Extbase_Persistence_QuerySettingsInterface'); $this->query->setQuerySettings($this->querySettings); $this->persistenceManager = $this->getMock('Tx_Extbase_Persistence_ManagerInterface'); $this->backend = $this->getMock('Tx_Extbase_Persistence_BackendInterface'); $this->backend->expects($this->any())->method('getQomFactory')->will($this->returnValue(NULL)); $this->persistenceManager->expects($this->any())->method('getBackend')->will($this->returnValue($this->backend)); $this->query->injectPersistenceManager($this->persistenceManager); $this->dataMapper = $this->getMock('Tx_Extbase_Persistence_Mapper_DataMapper'); $this->query->injectDataMapper($this->dataMapper); }