Question

I ran into this question: How do I fix my NetBeans + PHPUnit integration?

But applying the fix mentioned there does not work. Netbeans keeps saying the version of PHPUnit is too old and that I need at least 3.3.0, while I am using 3.3.9.

Screenschots: PHP Panel overview Error

I haven't editted anything about the files, I just downloaded the tgz, unzipped it all and put up the link.

Was it helpful?

Solution

Don't forget to add the path to PEAR library to the include path in your php.ini, not only in NetBeans

In my case PEAR was set up under F:/php5/PEAR. So i had to add this line

include_path = ".;F:\php5\PEAR

to my php.ini file

OTHER TIPS

Well, NetBeans obviously does not recognize the PHPUnit's version, the "too old" sentence is misleading in this case. I guess the problem is in the PHPUnit instalation and setup, not in the version.

Did you install PHPUnit using PEAR? Can you run some unit tests from commandline?

Another thing is, that PHPUnit classes should be available on PHP include path.

See this tutorial, I guess it should help.

You seem to have installed PHPUnit from the pear channel or website. You need to install the files from phpunit.de, as Vafliik already mentioned. Then, there should be a phpunit.bat in your php install folder. That is the one you need. Also make sure the folder where PEAR is installed is in your php path. The command line PHP may use a different php.ini, check that too.

There's another thing you can do: check that your PHPRC environment variable is correct.

My phpunit.bat file looks like this:

@echo off

C:\xampp\php\php.exe C:\xampp\php\phpunit %*

However, when I installed a separate version of PHP on my computer using the Windows Installer package it changed my PHPRC variable to point to c:\php\ , and that somehow caused NetBeans to show the 'too old' message.

Setting PHPRC to c:\xampp\php\ and restarting NetBeans fixed the problem.

Try running as administrator netbeans. Helped for me.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top