Monitor code coverage for PHP applications
Code Coverage for PHPUnit shows you how much of your code is covered with tests and marks covered and uncovered lines visually right in the editor.
Before you begin, make sure that:
The PHPUnit tool is installed on your machine and enabled in IntelliJ IDEA.
A Xdebug or Zend Debugger debugging engine is configured in the current PHP interpreter.
This functionality relies on the PHP plugin, which you need to install and enable.
note
The PHP plugin is available only in IntelliJ IDEA Ultimate.
Press CtrlAlt0S to open the IDE settings and select Plugins.
Open the Marketplace tab, find the PHP plugin, and click Install (restart the IDE if prompted).
Press CtrlAlt0S to open the IDE settings and select Build, Execution, Deployment | Coverage.
Specify coverage options on the Coverage page.
Write the tests manually.
Create a run configuration of the type PHPUnit.
On the main toolbar, select the PHPUnit run configuration in the Run/Debug Configurations list and click the Run with Coverage button
.
Review code coverage results.
Thanks for your feedback!