Hello Folk
I try to make PHPUnit work on my machine but unfortunately it doesn’t work.
This is my machine info
OS: Ubuntu 11.04
PHP 5.3.5-1ubuntu7.2 with Suhosin-Patch (cli) (built: May 2 2011 23:18:30)
Zend Engine v2.3.0
Xdebug v2.1.0
PHPUnit 3.5.14
selenium-server-standalone-2.0rc2
I create virtual host name “helloyii.localhost” I can browse demos app (it’s awesome)
Then I create new app by use command
php framework/yiic.php webapp testdrive
I can browse hxxp://helloyii.localhost/testdrive
and it work very well.
Note: I change http to hxxp because forum not allow me post URL in first post
Next step, I modified testdrive/protected/tests/WebTestCase.php to correct the TEST_BASE_URL
define('TEST_BASE_URL','hxxp://helloyii.localhost/testdrive/index-test.php/');
and phpunit.xml look like this
<phpunit bootstrap="bootstrap.php"
colors="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
stopOnFailure="false">
<selenium>
<browser name="Firefox" browser="*firefox" />
</selenium>
</phpunit>
finally I run phpunit and get error message
phpunit SiteTest.php
PHP Fatal error: Class 'WebTestCase' not found in /home/myhomefolder/www/helloyii.localhost/public_html/testdrive/protected/tests/functional/SiteTest.php on line 4
Fatal error: Class 'WebTestCase' not found in /home/myhomefolder/www/helloyii.localhost/public_html/testdrive/protected/tests/functional/SiteTest.php on line 4
I google a lot today, try many solution from the website I founded but still not work and I have no idea now.
Do I made mistake somewhere?
Thank you in advance for all opinion.