StephanJ
StephanJ

Reputation: 11

Netbeand 7.1 and PHPUnit 3.6.10

I have been trying to run simple PHPUnit tests with Netbeans 7.1 and PHPUnit 3.6.10 on Xampp 1.7.7

I have downloaded PHPUnit using PEAR and when I type the following, I get the output below

C:\xampp\php\PEAR>phpunit --version

PHPUnit 3.6.10 by Sebastian Bergmann.

Netbeans 7.1 is my problem. I have configured the following

Tools -> Options ->PHP (PHP 5 Interpreter) is C:\xampp\php\php.exe

Tools -> Options ->PHP (Unit Testing) C:\xampp\php\phpunit.bat

I keep getting the dreaded

Selected PHPUnit (version ?.?.?) is too old, upgrade it if possible (the minimum version in 3.3.0)

displayed.

Has ANYONE solved this issue?

PS the irony is, it was working at one stage!

Stephan

Upvotes: 1

Views: 729

Answers (2)

ThuanHan
ThuanHan

Reputation: 1

I have just fixed by adding c:\xampp\php into the PATH environment.

Guessing Netbeans, check phpUnit via the cmd:

C:\>phpunit --version

PHPUnit 3.6.11 by Sebastian Bergmann.

Upvotes: 0

Theodore R. Smith
Theodore R. Smith

Reputation: 23231

Yes...

I'm a WAMP guy, so I don't know XAMPP paths, but this is what you need to do:

Your PEAR path is wrongly set to C:\php5\pear. This is the development setting. Wamp/Xampp should have changed it, but they didn't.

The Solution:

  1. Edit every php.ini file, change INCLUDE_PATH to your path where WAMP Server is installed(e.g. C:\WAMP\bin\php\php5\includes).
  2. Now run go-pear.bat, and follow all the instructions. If everything is fine then its OK. You can check it by running http://localhost/phpinfo(). Else if go to Step 3.
  3. Right Click My Computer->Advanced Tab->Environment Variables->Add New User Variable->PHP_PEAR_INCLUDE_PATH->Add new value->The path where PEAR is installed(e.g. C:\WAMP\bin\php\php5\PEAR).

Upvotes: 1

Related Questions