IntelliJ IDEA 13.1 Web Help

Some features described here are available in Ultimate edition only.

File | Settings | PHP | PHPUnit

Note

The page and all the pages under this node are available only when the PHP and the PHPUnit repository plugins are downloaded, installed, and enabled.

Use this page to configure the way to launch unit tests of your PHP applications.

Item Description
PHPUnit Library In this area, specify where to take the PHPUnit test framework. The available options are:
  • Load from include path: choose this option to have IntelliJ IDEA run the PHPUnit from PEAR configured as an include path on the PHP page of the Settings dialog box.
  • Use custom loader: choose this option to run the PHPUnit instance installed by the Composer Dependency Manager. The package is retrieved and loaded by the dedicated autoload.php file located in the Vendor folder. Specify the location of the autoload.php file in the Path to script text box. Type the path manually or click the Browse button browseButton and select the file in the dialog box that opens,
  • Path to phpunit.phar: choose this option to run PHPUnit from the .phar archive.
    • If you already have the phpunit.phar archive on your computer, specify its location in the Path to phpunit.phar text box. Type the path manually or click the Browse button browseButton and select the file in the dialog box that opens,
    • If you have no .phar archive on your computer yet, click the Download phpunit.phar ... link to have IntelliJ IDEA download it automatically.

      In either case, IntelliJ IDEA will load the archive before test execution.

Configuration file In this text box, specify the XML file with additional test runner configuration options and possibly definitions of tests to execute.

When such file is specified, its configuration options override the default test runner configuration settings. If you have selected the Defined in the configuration file option in the Test scope area, the tests to execute are also taken from this file.

Type the path manually or click the Browse button browseButton.png and appoint the desired file in the Choose Test File dialog box, that opens.

Bootstrap file In this text box, specify the PHP script to be always executed before launching tests. Type the path manually or click the Browse button browseButton.png and select the desired folder in the dialog that opens.

See Also

Procedures:

Reference:

Web Resources: