Hello.
I have troubles with configuring testing framework.
When try to run unit tests on the whole "unit" directory the first test runs good, but all other tests throw a CDbException:
macdi:tests cr0t$ phpunit unit
PHPUnit 3.4.0 by Sebastian Bergmann.
.EEEEEEEEEEEEEEEEEEEEEEE
Time: 1 second
There were 23 errors:
1) CategoryPropertiesSetTest::testCreate
CDbException: CDbConnection is inactive and cannot perform any DB operations.
/Users/cr0t/Workspace/frameworks/yii-trunk/framework/db/CDbConnection.php:380
/Users/cr0t/Workspace/frameworks/yii-trunk/framework/db/ar/CActiveRecord.php:1930
/Users/cr0t/Workspace/frameworks/yii-trunk/framework/db/ar/CActiveRecord.php:328
/Users/cr0t/Workspace/frameworks/yii-trunk/framework/test/CDbFixtureManager.php:294
/Users/cr0t/Workspace/frameworks/yii-trunk/framework/test/CDbTestCase.php:117
2) CategoryTest::testCreate
CDbException: CDbConnection is inactive and cannot perform any DB operations.
/Users/cr0t/Workspace/frameworks/yii-trunk/framework/db/CDbConnection.php:380
/Users/cr0t/Workspace/frameworks/yii-trunk/framework/db/ar/CActiveRecord.php:1930
/Users/cr0t/Workspace/frameworks/yii-trunk/framework/db/ar/CActiveRecord.php:328
/Users/cr0t/Workspace/frameworks/yii-trunk/framework/test/CDbFixtureManager.php:294
/Users/cr0t/Workspace/frameworks/yii-trunk/framework/test/CDbTestCase.php:117
[...]
Why this can be (maybe there is a problem with __sleep() function at CDbConnection class)? If I run each test manually - everything is fine.