2011年9月15日 星期四

IntelliJ IDea 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 to start or Create 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=).



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!

This entry was posted in Feature and tagged PHP, PhpStorm, PHPUnit, testing. Bookmark the permalink.
page: 2

Web IDE EAP (build 94.5)
Posted on December 9, 2009 by neuro159

There are numerous updates in this build. As usually, most notable are listed below, with details on all (S)FTP, PHPUnit, formatting, javascript and other fixes available in the issue tracker.

Code analyzer will recognize classes, functions and constants referenced by their PHP 5.3 use aliases.
Added PHP Unit debugging and XML config support (included/excluded groups etc.)
Rename refactoring will take care of @param annotations
Undefined variable inspection will recognize pass by reference parameters as appropriate declarations, i.e. in preg_match(.., .. &$matches)
Basic “Add declaration” quickfix for unresolved class methods, properties and constants (Alt-Enter)
Tools|Analyze stacktrace
It looks like we’re done with PHPUnit support – no pending feature requests or bug fixes, please check it out.

Nearest plans include complete support for namespaces to finally close PHP 5.3 support, improved remote synchronization setup and all fixes and neat features that we will be able to stuff-in, just as usual.

Also since IntelliJ IDEA 9.0 is now released we are expecting third party plugins to be updated for 9.0 platform compatibility – that will bring them to WebIDE plugin repository.

Download Web IDE EAP build 94.5 for your platform from project EAP page.

-JetBrains Web IDE Team

reference : http://blog.jetbrains.com/webide/2009/12/phpunit-support/

沒有留言:

wibiya widget