Using PHPUnit_Extensions_PhptTestCase

I have not been able to figure out how to use PHPUnit_Extensions_PhptTestCase in Yii’s phpunit test environment. It is useful for integrating PHPT tests into PHPUnit tests. You can do some useful stuff like unit test file upload with that (

If I change my TestPHPT class to extend PHPUnit_Extensions_PhptTestCase instead of PHPUnit_Framework_TestCase or CDbTestCase then I get the error:

  • Class unit/TestPHPT could not be found in $WEBROOT$/protected/tests/unit/TestPHPT.php

Which is a bit odd.

Any ideas?


Install PHPUniteTest than

May be require this phpunit-selenium package than install it


Are you implying I should use functional test instead of unit test?