1
votes

I am trying to setup PHPUnit testing. Every time i run the test i get this error: Warning: require_once(PHPUnit/Extensions/SeleniumTestCase.php) That file doesn't exist. Tried reinstalling pear, PHPUnit and PHP, no success, i am getting the same error. From what i understand the SeleniumTestCase.php does need to be in PHPUnit/Extensions/ folder. Idealy i would like to settup all needed testing in NetBeans, here are some good info i found: http://dan-bower.net/installing-phpunit-selenium-with-wamp/ http://www.yiiframework.com/wiki/83/netbeans-ide-and-yii-projects/ Unfortunately this information didn't help me to fix the problem. FYI i am using Wamp server, Yii framework and NetBeans is my editor. If you have had similar issues and found the solution, please share the solution.

3

3 Answers

1
votes

This worked for me and seems way simpler:

  1. install the selenium plugin as explained here: http://netbeans.org/kb/docs/php/phpunit.html#selenium (at the bottom of the page, the "Running Tests on the Selenium Framework" title).
  2. go to php.ini (in wamp\bin\php\php5.3.xx, not the php.ini accessible in the wamp panel) and uncomment the line ;extension=php_curl.dll.
  3. in your command line: pear install phpunit/PHPUnit_Selenium as explained here http://www.phpunit.de/manual/3.6/en/selenium.html.

This allowed me to run the test in the aforementioned tutorial on netbeans' website. I hope it helps!

0
votes

I was having this error after installing PHPUnit and running $phpunit unit/DbTest.php

What solved the error for me was installing Selenium from pear channels. Here try this: pear install pear.phpunit.de/PHPUnit_Selenium.

Then rerun the PHPUnit test cases.