Reload/restore application configuration

Hi guys,

I was wondering if there is a quick way to reinitialize the web application’s components from a config file after the initial construction. I change components during testing and it carries over to the rest of the tests.

I was thinking something like :

$config = dirname(__FILE__).'/../config/server.test.php';

$config = require($config);



Replying to an old question, but finally solved using the same method of Since we were only changing one or two components per test, we could use

Yii::app()->setComponent("mycomponent", null);

to restore it.