Reputation: 2779
My NetBeans have an option to add a path to a script that runs PHPUnit, however when I try to add this script to my NetBeans I get the error that it doesn't recognize the version. Says that version is ?.?.? and that is not supported. However my PHPUnit version is supported by NetBeans and work perfectly when I run it from the pear installer folder (PHP).
"Selected PHPUnit (version ?.?.?) is too old, upgrade it if possible (the minimum version is 3.3.0)" - I got 3.6.4.
My script looks like this
#!/bin/sh
phpunit --bootstrap MyBootstrap.php --stderr $*
And it works great on linux NetBeans. Just not on my Mac. And yes it works perfect when I run it in the console.
Thanks a milion
/Marcus
Upvotes: 1
Views: 1388
Reputation: 124
Mate, that is error by Netbeans (see bug id 188240), and it looks like it is not fixed yet. It happens on Mac OSX.
What i did is to rename Application/NetBeans/NetBeans 7.1.1
to Application/NetBeans/NetBeans7.1.1
(note the lack of space)
as per Xdebug, read this: http://xdebug.org/find-binary.php
when you get the version for your server, add these lines into your php.ini:
zend_extension = /opt/local/lib/php/extensions/<name of your extension>/xdebug.so
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
replacing <name of your extension>
with, of course, the name of your extension :)
after this you should be ready to go.
Upvotes: 1
Reputation: 11
I solved the phpunit problem (too old phpunit message on netbeans)
First open terminal and then:
cd /private/etc
cp php.ini.default php.ini
php.ini
fileinclude_path
to include_path = ".:/usr/share/pear"
Problem solved :)
If however the problem is not solved then try install netbeans
for php from netbeans.org
Upvotes: 1
Reputation: 2779
Issue about version soved by reinstalling everything, however I now get this
PHPUnit 3.6.7 by Sebastian Bergmann.
The Xdebug extension is not loaded. No code coverage will be generated.
Cannot open file "/Applications/NetBeans/NetBeans".
How could I load Xdebug? Is that in php.ini or apache conf? or is that in NetBeans?
Upvotes: 0
Reputation: 5876
I'm not sure what php runner is, but to recognize valid PhpUnit, NetBeans run command "phpunit --version", so check what this command gives you in console.
Once I had problem with this, so I simply found the code of phpunit that is responsible for "phpunit --version" and manually type what should be printed when this command is executed. So NetBeans "saw" correct version and everybody is happy :)
Upvotes: 2