I've followed these steps to get PHPUnit working in NetBeans in windows:
Everything's working, except I don't have code completion working for PHPUnit. For example, if I type:
$this->asser
I would expect it to show a list of the various assert statements. But it doesn't.
I tried following this guide to get it working, but I don't know where the PHPUnit source files are, so I cannot add it to NetBean's PHP Global Include Path as per the instructions.
Where are the source files? Or is there another way for autocompletion to be correctly configured?
Thanks
You should have the PHP Windows installation. When I last did this using PEAR (which is deprecated) PHPUnit was installed under the root of the PHP web server. I would bet that PHAR puts it in the same place.
Once that is done, you typically have to set up a bootstrap that tells Netbeans where to look for executables, directories and such. Oddly enough the Netbeans tutorial doesn't mention that you have to extend
the PHPUnit class for your test. That should give you the autocomplete you seek.
class ClassTest extends PHPUnit_Framework_TestCase {
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With