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 (http://qafoo.com/blog/013_testing_file_uploads_with_php.html)

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?

Hi

Install PHPUniteTest than

http://www.yiiframework.com/doc/guide/1.1/en/test.functional

http://www.yiiframework.com/forum/index.php?/topic/8298-testing-controller/

May be require this phpunit-selenium package than install it

Tahnks

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