/** * @return void */ protected function registerEventSubscribers() { foreach ($this->config->getConfig()['event']['subscriber'] as $subscriberClass) { $subscriber = new $subscriberClass(); $this->dispatcher->addSubscriber($subscriber); } }
/** * config array setter is used in some tests on @see \N98\Magento\Application::setConfig() * * @test */ public function setConfig() { $config = new Config(); $config->setConfig(array(0, 1, 2)); $actual = $config->getConfig(); $this->assertSame($actual[1], 1); }
/** * @param bool $soft * * @return void */ protected function _initMagento1($soft = false) { if (!class_exists('Mage', false)) { // Create a new AutoloadRestorer to capture currenjt auto-öpaders $restorer = new AutoloadRestorer(); // require app/Mage.php from Magento in a function of it's own to have it's own variable scope $this->requireOnce($this->_magentoRootFolder . '/app/Mage.php'); // Restore auto-loaders that might be removed by extensions that overwrite Varien/Autoload $restorer->restore(); } // skip Mage::app init routine and return if ($soft === true) { return; } $config = $this->config->getConfig(); $initSettings = $config['init']; Mage::app($initSettings['code'], $initSettings['type'], $initSettings['options']); }