Following the book Agile Web Application Development with Yii 1.1 and PHP5 I am struggling to make Yii, Selenium and PHPUnit working on Windows 7. It doesn’t work. Help!
(the book describes the steps o p.45-46-47)
Installed PHPUnit: OK
Installed and running Selenium standalone: OK, running in console
Changed demo/protected/tests/WebTestCase.php as described: OK
cd protected/tests : OK
running >phpunit functional/SiteTest.php KO, it completes without any message or error.
Anyone has experienced the same thing or can give any suggestion to solve or diagnose the problem?
I’ve solved it and I share it my experience (several question about this issue on Internet)
Behind the scene there’s an error but the php.ini hided it.
I’ve changed the display_errors = Off to display_errors = On in the php.ini.
Running again the functional test I’ve discovered that the error was in the line 11 of the class CWebTestCase.php (require_once(‘PHPUnit/Extensions/SeleniumTestCase.php’)) due to Selenium extension missing
on my pc.
Everyone can verify if it’s missing (or not) looking at PEAR\PHPUnit\Extensions directory
I have downloaded the extension with: pear install phpunit/PHPUnit_Selenium
I’ve revert the 2. update (again to Off).
I’ve run the phpunit functional/SiteTest.php and it works!