public function setUp() { // setup config provider to fake tests $this->initialIniProvider = ConfigurationManager::retrieveProvider('ini'); // setup fake ini provider to avoid file-based configuration files $provider = new FakeIniProvider(); $config = new IniConfiguration(); // setup section for action $action = new IniConfiguration(); $action->setValue('ActionClass', PriorityAwareTestAction::class); $config->setSection(FrontControllerActionPriorityTest::TEST_ACTION_NAME, $action); $provider->registerConfiguration(self::TEST_ACTION_NAMESPACE, self::TEST_ACTION_CONFIG_NAME, $config); ConfigurationManager::registerProvider('ini', $provider); }
protected function setUp() { // setup config provider to fake tests $this->initialIniProvider = ConfigurationManager::retrieveProvider('ini'); // setup fake ini provider to avoid file-based configuration files $provider = new FakeIniProvider(); $config = new IniConfiguration(); // setup section for action $action = new IniConfiguration(); $action->setValue('ActionClass', FilterTestAction::class); $config->setSection('say-foo', $action); $provider->registerConfiguration('VENDOR\\foo', self::TEST_ACTION_CONFIG_NAME, $config); $config->setSection('say-bar', $action); $provider->registerConfiguration('VENDOR\\bar', self::TEST_ACTION_CONFIG_NAME, $config); $config->setSection('say-baz', $action); $provider->registerConfiguration('VENDOR\\baz', self::TEST_ACTION_CONFIG_NAME, $config); ConfigurationManager::registerProvider('ini', $provider); }