IntelliJ IDEA 2023.1 Help

Test PHP applications

The topics in this part provide guidelines in PHP-specific unit testing procedures. For general information on testing in IntelliJ IDEA, see the section Run tests.

IntelliJ IDEA supports unit testing of PHP applications through integration with the PHPUnit testing framework.

Generally, IntelliJ IDEA runs and debugs PHPUnit tests same way as other applications, by running the run/debug configurations you have created. When doing so, it passes the specified test class, file, or directory to the test runner. You can run unit testing locally and remotely depending on the chosen run configuration.

Install the PHP plugin

This functionality relies on the PHP plugin, which you need to install and enable.

  1. Press Control+Alt+S to open the IDE settings and select Plugins.

  2. Open the Marketplace tab, find the PHP plugin, and click Install (restart the IDE if prompted).

Create and run unit tests on PHP applications, perform the following general steps:

Last modified: 21 June 2023