This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | PHPUnit shell command invalid syntax | ||
---|---|---|---|
Product: | php | Reporter: | Trii |
Component: | PHPUnit | Assignee: | Tomas Mysik <tmysik> |
Status: | RESOLVED INCOMPLETE | ||
Severity: | normal | CC: | phejl, tmysik |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | Macintosh (x86) | ||
OS: | Mac OS X | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Trii
2010-06-30 13:35:00 UTC
Here is the actual output of the command: Josh:~$ /usr/bin/phpunit --log-junit /var/folders/wG/wGrdprT6HmmuglFInzcWZk+++TI/-Tmp-/nb-phpunit-log.xml --bootstrap /Users/Josh/NetBeansProjects/Breach/MainRepo/tests/testinit.php NetBeansSuite /Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/php/phpunit/NetBeansSuite.php run=/Users/Josh/NetBeansProjects/Breach/MainRepo/tests/application/classes/service/json/IncidentsTest.php PHPUnit 3.4.14 by Sebastian Bergmann. Cannot open file ".//Applications/NetBeans/NetBeans". Do I understand correctly that if a project has a space in its name, PHPUnit support does not work? If not, please, provide exact steps to reproduce. Thanks. If any of the path arguments have a space in them it will fail. In my example, the problem is that the default installed app on OS X is: /Applications/Netbeans/Netbeans 6.9.app The space between Netbeans and 6.9.app is causing the shell to treat them as two arguments. I guess NetBeans makes its own custom PHPUnit suite and stores it in: @APP_PATH@/Contents/Resources/NetBeans/php/phpunit/NetBeansSuite.php When NetBeans passes this argument to phpunit (and all arguments for that matter) it should be quoted so it is treated as a single argument instead of two Just now I renamed the app and moved it to: /Application/Netbeans/6.9/Netbeans.app and phpunit via the Test menu option works as expected. I will try to reproduce and fix. batch reassigning Batch reassigning. Right, it seems that the arguments are not quoted automatically. Needs to be fixed. (In reply to comment #8) > Right, it seems that the arguments are not quoted automatically. Needs to be > fixed. Petr, can you confirm, please? Or am I wrong? After discussion with Petr, reassigning. Thanks. Fixed in web-main 5f5ad3b12ec3. Please verify. Command itself should be escaped as well: 342f06db94e1 Executable escaped on windows only 2658c5b6dcf4. Minor fix is needed in PHP project as well. NetBeans test suite fixed (possible quotes taken into account). http://hg.netbeans.org/web-main/rev/4d8758fcf164 Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/5f5ad3b12ec3 User: phejl@netbeans.org Log: #188240 PHPUnit shell command invalid syntax Reopening since this seems to be a problem specific only for Mac platform (I cannot reproduce on Linux). Can you please try to reproduce your problem and tell us what are the arguments passed to the _phpunit script itself_? Just open your phpunit script and use "print_r()" function to print command line arguments ($_SERVER['argv']). Please, reopen this issue and paste the result here. Thanks for your coopeartion. The behavior of EPB reverted to original one 0a0953f22763. Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/4d8758fcf164 User: Tomas Mysik <tmysik@netbeans.org> Log: #188240 - PHPUnit shell command invalid syntax Quotes taken into account. |