/** * Sets up the APC backend used for testing * * @return \TYPO3\Flow\Cache\Backend\PdoBackend */ protected function setUpBackend() { $mockEnvironment = $this->getMock(\TYPO3\Flow\Utility\Environment::class, array(), array(), '', FALSE); $mockCache = $this->getMock(\TYPO3\Flow\Cache\Frontend\FrontendInterface::class, array(), array(), '', FALSE); $mockCache->expects($this->any())->method('getIdentifier')->will($this->returnValue('TestCache')); $backend = new \TYPO3\Flow\Cache\Backend\PdoBackend(new ApplicationContext('Testing')); $backend->injectEnvironment($mockEnvironment); $backend->setCache($mockCache); $backend->setDataSourceName('sqlite::memory:'); $backend->initializeObject(); return $backend; }