Hi , I’m new with Yii and need some help.
I’m testing my app but I get this Exception:
CDbException: CDbConnection failed to open the DB Connection.
This is part of my configuration file in config/main.php
‘db’=>array(
'class'=>'CDbConnection',
'connectionString' => 'mysql:host=localhost;dbname=yiidb',
'emulatePrepare' => true,
'username' => 'yiiuser',
'password' => 'yiipass',
'charset' => 'utf8',
),
This is my unit test file:
class DbTest extends CTestCase
{
public function testConnection()
{
$this->assertNotEquals(NULL,Yii::app()->db);
}
}
I have all the requeriments installed.
I have a Windows 7 64x + WAMP 1.7.4 (PHP 5.2.5 , Apache 2.2.6 , MySql 5.0.45) , Yii 1.1.4.
Thanks for your help.
Regards,
Diego.