/** * @author Karsten Dambekalns <*****@*****.**> * @author Robert Lemke <*****@*****.**> */ public function setUp() { \vfsStreamWrapper::register(); $mockPackage = $this->getMock('F3\\FLOW3\\Package\\Package', array(), array(), '', FALSE); $mockPackage->expects($this->any())->method('getClassesPath')->will($this->returnValue(\vfsStream::url('Virtual/Classes/'))); $mockPackages = array('Virtual' => $mockPackage); $this->classLoader = new \F3\FLOW3\Resource\ClassLoader(); $this->classLoader->setPackages($mockPackages); }
/** * Initializes the package system and loads the package configuration and settings * provided by the packages. * * @return void * @author Robert Lemke <*****@*****.**> * @see initialize() */ public function initializePackages() { $this->packageManager = $this->objectManager->getObject('F3\\FLOW3\\Package\\PackageManagerInterface'); $this->packageManager->initialize(); $activePackages = $this->packageManager->getActivePackages(); $this->classLoader->setPackages($activePackages); $this->configurationManager->setPackages($activePackages); foreach ($activePackages as $packageKey => $package) { $packageConfiguration = $this->configurationManager->getConfiguration(\F3\FLOW3\Configuration\ConfigurationManager::CONFIGURATION_TYPE_PACKAGE, $packageKey); $this->evaluatePackageConfiguration($package, $packageConfiguration); } }