{"id":7757,"date":"2009-12-09T10:58:48","date_gmt":"2009-12-09T15:58:48","guid":{"rendered":"https:\/\/blogs.jetbrains.com\/webide\/?p=338"},"modified":"2013-01-22T16:19:45","modified_gmt":"2013-01-22T16:19:45","slug":"phpunit-support","status":"publish","type":"webide","link":"https:\/\/blog.jetbrains.com\/fr\/webide\/2009\/12\/phpunit-support","title":{"rendered":"PHPUnit Support"},"content":{"rendered":"<p>After you <a href=\"http:\/\/www.phpunit.de\/manual\/current\/en\/installation.html\" target=\"_blank\" rel=\"noopener\">set up PHPUnit<\/a>, Web IDE greatly helps you to run your tests. Namely, to quickly create test run configuration:<\/p>\n<ol>\n<li>Right-click the desired target: a directory or a PHP file in the Project view,<strong> <\/strong>or a test class\/method name in the code editor<\/li>\n<li>Choose <strong>Run&lt;name&gt;<\/strong> to start or <strong>Create&lt;name&gt;<\/strong> to specify additional parameters<\/li>\n<\/ol>\n<p>That&#8217;s it!<\/p>\n<h4><!--more--><\/h4>\n<h4>XML configuration file<\/h4>\n<p>Advanced settings can be specified through PHPUnit <a href=\"http:\/\/www.phpunit.de\/manual\/current\/en\/appendixes.configuration.html\" target=\"_blank\" rel=\"noopener\">configuration file<\/a>. All the options specified in Web IDE take precedence over those set in configuration file.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-348\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2009\/12\/webide-configuration_xml.png\" alt=\"\" width=\"621\" height=\"445\" \/><\/p>\n<h4>Test groups<\/h4>\n<p>A test can be tagged as belonging to one or more groups using the @group annotation as shown below.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-362\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2009\/12\/webide-groupannotation.png\" alt=\"\" width=\"488\" height=\"130\" \/><\/p>\n<p>The test is run if none of the specified groups is excluded and at least one group is included.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-350\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2009\/12\/webide-configuration_groups.png\" alt=\"\" width=\"621\" height=\"361\" \/><\/p>\n<h4>Run\/Debug Tests<\/h4>\n<p>Before you execute tests, please set up PHP home directory (one that contains PHP executable) in <strong>Settings |<\/strong> <strong>PHP<\/strong>. Debugging is currently available via <a href=\"http:\/\/xdebug.org\" target=\"_blank\" rel=\"noopener\">XDebug<\/a>. Specify the same debug port in <strong>Settings |<\/strong> <strong>PHP<\/strong> as in php.ini file (xdebug.remote_port=&lt;port number&gt;).<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-351\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2009\/12\/webide-settings1.png\" alt=\"\" width=\"618\" height=\"263\" \/><\/p>\n<h4>Test results window<\/h4>\n<p>You can easily navigate from tests results tree and stack trace to the corresponding source code location.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-345\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2009\/12\/webide-run_console.png\" alt=\"\" width=\"606\" height=\"351\" \/><\/p>\n<p>When debugging your tests you get all the features, such as watches, expressions evaluation, etc. You can have several debug sessions simultaneously.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-355\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2009\/12\/webide-debug_console2.png\" alt=\"\" width=\"607\" height=\"487\" \/><\/p>\n<p>All of these features will be available since next EAP.<\/p>\n<p>Test with pleasure!<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","categories":[808],"tags":[190,45,359,207],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/webide\/7757"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/webide"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/types\/webide"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/comments?post=7757"}],"version-history":[{"count":0,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/webide\/7757\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/media?parent=7757"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/categories?post=7757"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/tags?post=7757"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/cross-post-tag?post=7757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}