I have installed Netbeans together with PHPUnit
and phpunit-skeleton-generator
from homebrew. I can generate a testfile from the terminal by running phpunit-skelgen --test -- "UrlDecoder" classes/UrlDecoder.class.php
, however Netbeans refuses when I right-click the file, select tools
> Create tests
. This is the error I get:
And this is the output from the log:
"/usr/local/opt/php55/bin/php" "/usr/local/bin/phpunit-skelgen" "--ansi" "generate-test" "--bootstrap=/Users/paulp/Sites/fortv/tests/bootstrap.php" "UrlDecoder" "/Users/paulp/Sites/fortv/classes/UrlDecoder.class.php" "UrlDecoderTest" "/Users/paulp/Sites/fortv/tests/classes/UrlDecoder.classTest.php"
/usr/bin/env php -d allow_url_fopen=On -d detect_unicode=Off /usr/local/Cellar/phpunit-skeleton-generator/1.2.1/libexec/phpunit-skelgen-1.2.1.phar $*
Done.
Most tutorials and help I find online are for Netbeans 7.x, which makes things harder. I have tried with different bootstrap files and xml files, but no different result. The Output tells me nothing, and nothing happens. I have googled this for a bit, but found nothing similar to my problem.
The only thing I notice is the --ansi
part, which the skeleton generator documentation doesn't seem to offer.
My question: How can I get Netbeans to generate tests using phpunit skeleton generator?
However my first experience with phpunit installation was not so funny. So I can understand that users could be frustrated at the begining. It was because I have expected full automation through plugin installation and such things which not worked. That's why I describe full process (phpunit+netbeans on osx)on my [blog][1].