PHPUnit Support
After you set up PHPUnit, Web IDE greatly helps you to run your tests. Namely, to quickly create test run configuration:
- Right-click the desired target: a directory or a PHP file in the Project view, or a test class/method name in the code editor
- Choose Run<name> to start or Create<name> to specify additional parameters
That’s it!
XML configuration file
Advanced settings can be specified through PHPUnit configuration file. All the options specified in Web IDE take precedence over those set in configuration file.
Test groups
A test can be tagged as belonging to one or more groups using the @group annotation as shown below.
The test is run if none of the specified groups is excluded and at least one group is included.
Run/Debug Tests
Before you execute tests, please set up PHP home directory (one that contains PHP executable) in Settings | PHP. Debugging is currently available via XDebug. Specify the same debug port in Settings | PHP as in php.ini file (xdebug.remote_port=<port number>).
Test results window
You can easily navigate from tests results tree and stack trace to the corresponding source code location.
When debugging your tests you get all the features, such as watches, expressions evaluation, etc. You can have several debug sessions simultaneously.
All of these features will be available since next EAP.
Test with pleasure!