Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix the "unrecognized option --run" on NetBeans running PHPUnit

I'm trying to run the PHPUnit into the NetBeans 8.0.2.

If I run # phpunit inside my folder tests all tests run. So it's seems been set right.

But in the NetBeans output I always got:

"C:\nginx\php\5.6.12\php.exe" "C:\nginx\php\5.6.12\phpunit.phar" "--colors" "--log-junit" "C:\Users\...\AppData\Local\Temp\nb-phpunit-log.xml" "--bootstrap" "E:\var\www\...\tests\TestHelper.php" "--configuration" "E:\var\www\...\tests\phpunit.xml" "C:\Program Files\NetBeans 8.0.2\php\phpunit\NetBeansSuite.php" "--run=E:\var\www\...\tests\app\utils\FormatUtilTest.php"

PHPUnit 4.8.2 by Sebastian Bergmann and contributors.

unrecognized option --run

Done.

Maybe the "--run message" it's right, because this command doesn't exist in the PHPUnit manual. But if is that so, how to create another script for the NetBeans execute the tests?

like image 336
Pablo Avatar asked Aug 09 '15 13:08

Pablo


2 Answers

I ran into the same issue yesterday after a PHPUnit update. So I reverted back to PHPUnit 4.7.7 for now, until this is fixed in NB.

like image 117
Luuk Avatar answered Sep 19 '22 00:09

Luuk


I too have encountered this error causing the latest version of PHPUnit not to work with NetBeans v8.0.2.

Further investigating this issue has resulted in determining that there is an incompatibility between NetBeansSuite.php and the latest version of PHPUnit.

The error 'unrecognized option --run' is being thrown by the phpunit.phar and not being thrown by NetBeansSuite.php. I also do not believe the NetBeansSuite.php is even being executed.

phpunit.phar, line 63816 or 63894, is where the exception is being thrown.

Until this is fixed, PHPUnit will not work from NetBeans v8.0.2.

@Pablo: I thank you for opening an issue and have commented on your issue.

PHPUnit v4.7.7 works correctly.

Opened a bug report: https://netbeans.org/bugzilla/show_bug.cgi?id=254276

like image 29
Agilis Avatar answered Sep 21 '22 00:09

Agilis