I have installed PHPUnit & Selenium as an admin using CMD. I am following along in the book Agile Web Application Development with Yii1.1 and PHP5 and am stuck trying to get phpunit to run a test on the helloWorld app as expected.
I am running Windows 7 with Xampp 1.7.4. I upgraded Pear to version 1.9.4 and installed phpunit 3.6.10 with Selenium 2.2.0.
I run the following as given in the initial unit test example in the book:
%cd protected\tests\
%phpunit functional\SiteTest.php
And am met with the following errors:
d:\xampp\htdocs\testapp\protected\tests>phpunit functional\SiteTest.php
PHP Warning: include(D:\xampp\yii\yii_root\framework\test\CWebTestCase.php): fa
iled to open stream: No such file or directory in D:\xampp\yii\yii_root\framewor
k\YiiBase.php on line 397
Warning: include(D:\xampp\yii\yii_root\framework\test\CWebTestCase.php): failed
to open stream: No such file or directory in D:\xampp\yii\yii_root\framework\Yii
Base.php on line 397
PHP Warning: include(): Failed opening 'D:\xampp\yii\yii_root\framework\test\CW
ebTestCase.php' for inclusion (include_path='.<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/grin.gif' class='bbc_emoticon' alt=';D' />:\xampp\php\PEAR') in D:\xampp\y
ii\yii_root\framework\YiiBase.php on line 397
Warning: include(): Failed opening 'D:\xampp\yii\yii_root\framework\test\CWebTes
tCase.php' for inclusion (include_path='.<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/grin.gif' class='bbc_emoticon' alt=';D' />:\xampp\php\PEAR') in D:\xampp\yii\yi
i_root\framework\YiiBase.php on line 397
PHP Fatal error: Class 'CWebTestCase' not found in D:\xampp\htdocs\testapp\prot
ected\tests\WebTestCase.php on line 15
Fatal error: Class 'CWebTestCase' not found in D:\xampp\htdocs\testapp\protected
\tests\WebTestCase.php on line 15
I’m not sure how to fix this and have been scouring the forums for a hint, but can’t for the life of me figure this out.
I’ve been struggling with this for the past 5 hours – so any help in solving this would be greatly appreciated!!