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.
Hi all, From version 2.0.x of PHPUnit Skeleton generator tool, the parameters changed. Based on php.phpunit/src/org/netbeans/modules/php/phpunit/commands/SkeletonGenerator.java, in 'params' definition : - BOOTSTRAP_PARAM = "--bootstrap"; // Unchanged - TEST_PARAM = "--test"; // From 2.0.x -> TEST_PARAM = "generate-test" - SEPARATOR_PARAM = "--"; // There is no separator param Before 2.0.x : "/usr/bin/php" "/var/www/project/vendor/bin/phpunit-skelgen" "--bootstrap" "/var/www/project/tests/bootstrap.php" "--test" "--" "Project\User" "/var/www/project/src/Project/User.php" "Project\UserTest" "/var/www/project/tests/src/Project/UserTest.php" From 2.0.x : "/usr/bin/php" "/var/www/project/vendor/bin/phpunit-skelgen" generate-test --bootstrap="/var/www/project/tests/bootstrap.php" "Project\User" "/var/www/project/src/Project/User.php" "Project\UserTest" "/var/www/project/tests/src/Project/UserTest.php" Maybe, it will be interesting to handle the two versions in this file. Best regards.
We definitely need to solve this, thanks for catching it.
Done. Both version 1 and 2 are supported now (including a bootstrap file). Thanks. http://hg.netbeans.org/web-main/rev/a70eae4987f4 http://hg.netbeans.org/web-main/rev/2c31d1c69e08
Nice job Tomas.
(In reply to afrawan_artisan from comment #3) > Nice job Tomas. Thanks! It would be great if you could try it (simply wait for a message which will appear here telling where to download a dev build of NetBeans with this change). Thanks.
Integrated into 'main-silver', will be available in build *201406250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/a70eae4987f4 User: Tomas Mysik <tmysik@netbeans.org> Log: #245179 - Parameters of PHPUnit Skeleton generator changed in 2.0.x
*** Bug 245281 has been marked as a duplicate of this bug. ***
Verified, both old 1.2.1 and new 2.0.x work fine Product Version: NetBeans IDE Dev (Build 201406300002) Java: 1.8.0_05; Java HotSpot(TM) Client VM 25.5-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13 System: Linux version 3.13.0-29-generic running on i386; UTF-8; en_US (nb)
*** Bug 245175 has been marked as a duplicate of this bug. ***
Created attachment 148294 [details] When trying to run Test case PHPUnit , it pop ups ( [InvalidArgumentException] Command "Calculator" is not defined. ) When trying to run Test case PHPUnit , it pop ups ( [InvalidArgumentException] Command "Calculator" is not defined. ) PHPUnit version = PHPUnit 4.1.4 by Sebastian Bergmann. Skele generator = phpunit-skelgen version 2.0.1
Comment on attachment 148294 [details] When trying to run Test case PHPUnit , it pop ups ( [InvalidArgumentException] Command "Calculator" is not defined. ) SOLVED BUG CLOSED
@naveenyalla: Not sure what you mean by your comments but you need a dev version of NetBeans, of course (get it from the link in comment #5). Thanks.
*** Bug 247162 has been marked as a duplicate of this bug. ***
I think something was changes in PHPUnit Skeleton, becouse it stopped to work for me. I definied a bootstrap file and it is connected to PHPUnit, tests are running OK. The NetBeans generate this path, which doesn't work: "C:\Users\Dariusz Bruj\AppData\Roaming\Composer\vendor\bin\phpunit-skelgen-2.0.bat" "--ansi" "generate-test" "SurveyController" "E:\CloudStation\Praca\ARCHEMIA\website\app\controllers\SurveyController.php" "SurveyControllerTest" "E:\CloudStation\Praca\ARCHEMIA\website\test\app\controllers\SurveyControllerTest.php When i insert a bootstrap parameter it works: "C:\Users\Dariusz Bruj\AppData\Roaming\Composer\vendor\bin\phpunit-skelgen-2.0.bat" generate-test --bootstrap "E:\CloudStation\Praca\ARCHEMIA\website\test\bootstrap.php" --ansi "SurveyController" "E:\CloudStation\Praca\ARCHEMIA\website\app\controllers\SurveyController.php" "SurveyControllerTest" "E:\CloudStation\Praca\ARCHEMIA\website\test\app\controllers\SurveyControllerTest.php" I would like you to resolve this problem. Thanks in advance!
@dariuszbruj: Please, do not reopen VERIFIED issues. Simply report a new one instead. BTW it seems to be a problem in your IDE setup - you must check "Use Bootstrap for Creating New Unit Tests" checkbox in your Project Properties (category PHPUnit). Or define bootstrap in your PHPUnit XML configuration. Last note: _always_ attach your IDE log [1] and also provide exact error message. Thanks. [1] http://wiki.netbeans.org/FaqLogMessagesFile