You can implement it with duplicating your config file main.php to main-test.php and index.php to index-test.php. In the main-test.php file set the new DB connection properties. In index-test.php change the path to configuration and you can also enable the debug. Here is an example of your index-test.php:
$yii = '/opt/yii/framework/yii.php'; $config = dirname(__FILE__) . '/protected/config/main-test.php'; defined('YII_DEBUG') or define('YII_DEBUG', true); defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3); require_once($yii); Yii::createWebApplication($config)->run();
And don't forget to use the URL with index-test.php in it.