I try to run unit tests in demos/blog/protected/tests using the following command:
>phpunit unit/PostTest.php
but get the following errors:
[i]
PHPUnit 3.4.12 by Sebastian Bergmann.
Fatal error: Class ‘Post’ not found in C:\xampp\htdocs\yii\framework\db\ar\CActiveRecord.php on line 341
[/i]
After run this, a new file Post.php is created in the tests directory with empty contents.
I changed the bootstrap.php to include the test.php config file and webtestcase.php to include the correct TEST_BASE_URL. But when I test the blog application in browser, it is working.
btw, the database is also configured to point to blog-test.db
Can anyone help me correct this error?