phpunit connect db error, need help

I’ve created blog db, and can connect it.Why get the following error, thanks for help!

====================================================

D:\wamp\www\yii\demos\blog\protected\tests>phpunit unit\usertest.php

PHPUnit 3.5.3 by Sebastian Bergmann.

E

Time: 0 seconds, Memory: 5.00Mb

There was 1 error:

  1. UserTest::testCreate

CDbException: CDbConnection failed to open the DB connection.

D:\wamp\www\yii\framework\db\CDbConnection.php:275

D:\wamp\www\yii\framework\db\CDbConnection.php:242

D:\wamp\www\yii\framework\db\CDbConnection.php:221

D:\wamp\www\yii\framework\base\CModule.php:363

D:\wamp\www\yii\framework\test\CDbFixtureManager.php:96

D:\wamp\www\yii\framework\test\CDbFixtureManager.php:232

D:\wamp\www\yii\framework\test\CDbFixtureManager.php:113

D:\wamp\www\yii\framework\test\CDbFixtureManager.php:85

D:\wamp\www\yii\framework\base\CModule.php:363

D:\wamp\www\yii\framework\test\CDbTestCase.php:84

D:\wamp\www\yii\framework\test\CDbTestCase.php:116

D:\work\php\phpunit:55

FAILURES!

Tests: 1, Assertions: 0, Errors: 1.

hello,

it might be a funny question, but did you set up the correct credentials in:


protected/config/test.php

–iM

I modified the test.php, it seems still the same error,:(

I also have this problem.

Link

maybe the php installed don’t support pdo.

apt-get php5-mysql

install pdo