phpunit - Get "Run Focused Test Method" to work in netbeans -


a file, searchtest.php, has:

public function testsearchthenbooking(){ ... } 

when right-click can see "run focused test method" (and "debug focused test method"), greyed out.

i realized phpunit netbeans plugin not installed. i've installed that, restarted netbeans, no difference.

phpunit commandline working fine, , running , passing function.

this answer show working people! https://stackoverflow.com/a/30568731/841830

do need configure project use phpunit, or tell phpunit is, or ... ?

yes, need manually download phpunit script , skeleton generator script

wget https://phar.phpunit.de/phpunit.phar chmod +x phpunit.phar sudo mv phpunit.phar /usr/local/bin/phpunit  wget https://phar.phpunit.de/phpunit-skelgen.phar chmod +x phpunit-skelgen.phar sudo mv phpunit-skelgen.phar /usr/local/bin/phpunit-skelgen 

and complete tools/options/frameworks & tools form

enter image description here

full details installation , configuration can found here. if that, won't work because there bug in last version of netbeans (8.0.2).

bug 254276 - netbeans v8.0.2 incompatible w/ latest phpunit version.

so have 2 choices: either use nightly build contain following patch solving problem:

 1.1 --- a/php.phpunit/src/org/netbeans/modules/php/phpunit/commands/phpunit.java  1.2 +++ b/php.phpunit/src/org/netbeans/modules/php/phpunit/commands/phpunit.java  1.3 @@ -123,6 +123,7 @@  1.4      private static final string coverage_log_param = "--coverage-clover"; // noi18n  1.5      private static final string list_groups_param = "--list-groups"; // noi18n  1.6      private static final string group_param = "--group"; // noi18n  1.7 +    private static final string param_separator = "--"; // noi18n  1.8      // bootstrap & config  1.9      private static final string bootstrap_param = "--bootstrap"; // noi18n 1.10      private static final string bootstrap_filename = "bootstrap%s.php"; // noi18n 1.11 @@ -319,6 +320,8 @@ 1.12              // #218607 - hotfix 1.13              //params.add(suite_name) 1.14              params.add(getnbsuite().getabsolutepath()); 1.15 +            // #254276 1.16 +            params.add(param_separator); 1.17              params.add(string.format(suite_run, joinpaths(runinfo.getstartfiles(), suite_path_delimiter))); 1.18          } 1.19   

either wait next release.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -