public function testGetContainerSuccessfullySaved() { $this->_setupMocks(2); $mockSystemDir = sys_get_temp_dir(); $this->_mockBootSettings->shouldReceive('getPathToSystemCacheDirectory')->atLeast(1)->andReturn($mockSystemDir); $result = $this->_sut->getNewSymfonyContainer(); $this->assertFileExists($mockSystemDir . '/TubePressServiceContainer.php'); $this->assertInstanceOf('\\Symfony\\Component\\DependencyInjection\\ContainerInterface', $result); }
/** * @return tubepress_api_ioc_ContainerInterface */ private function _getNewTubePressContainer() { if ($this->_logEnabled) { $this->_logDebug('We cannot boot from cache. Will perform a full boot instead.'); } $this->_buildTemporaryClassLoader(); $this->_buildUncachedContainerSupplier(); $result = $this->_uncachedContainerSupplier->getNewSymfonyContainer(); $tubePressContainer = new tubepress_internal_ioc_Container($result); spl_autoload_unregister(array($this->_temporaryClassLoader, 'loadClass')); $this->_setEphemeralServicesToContainer($tubePressContainer, $result); return $tubePressContainer; }