1
votes

I have installed, via Composer, the latest versions of PHPUnit and the Skeleton Generator, 4.1.3 and 2.0.1, respectively. I have installed it to my project directory and confirmed that I can test all files. I cannot, however, run the skeleton generator to create new tests. I am using Netbeans and its PHPUnit integration to create the tests. When I attempt to generate the tests, I get the following:

"C:\xampp\php\php.exe" "C:\Users\Bob\Projects\[myProject]\website\vendor\phpunit\phpunit-skeleton-generator\phpunit-skelgen" "--test" "--" "Security\SecureAPI" "C:\Users\Bob\Projects\[myProject]\website\src\Security\SecureAPI.php" "Security\SecureAPITest" "C:\Users\Bob\Projects\[myProject]\website\test\phpunit\src\Security\SecureAPITest.php"
phpunit-skelgen 2.0.1 by Sebastian Bergmann.


[InvalidArgumentException]                    
Command "Security\SecureAPI" is not defined.                                             

Done.

I had the Netbeans 'Use Bootstrap for Creating New Unit Tests' option selected prior to this, and got this error:

"C:\xampp\php\php.exe" "C:\Users\Bob\Projects\[myProject]\website\vendor\phpunit\phpunit-skeleton-generator\phpunit-skelgen" "--bootstrap" "C:\Users\Bob\Projects\[myProject]\website\test\phpunit\bootstrap.php" "--test" ...

[InvalidArgumentException]                       
There are no commands defined in the "C" namespace.

Generating tests with version 1.2.1 worked fine on my old development machine. I'm wondering if the issues are specific to version 2.0.1 of the skelgen. It seems to be viewing the C: as a namespace, whereas 1.2.1 did not. I've confirmed that Netbeans produced identical command line instructions for 1.2.1 and 2.0.1, so it appears that the way they are being interpreted has changed.

Has anyone else seen this? Any ideas? I'm running a Win7 machine with Netbeans 8.0. Thanks in advance.

1

1 Answers

3
votes

Try to download Dev build of NetBeans from here, the issue with changes in Skeleton Generator 2.x was fixed few days ago