IntelliJ IDEA 14.0.0 Web Help

PHPUnit

File | Settings | Languages and Frameworks | PHP | PHPUnit


The page is available only when the PHP plugin is enabled.

The plugin is not bundled with IntelliJ IDEA, but it is available from the JetBrains plugin repository. Once enabled, the plugin is available at the IDE level, that is, you can use it in all your IntelliJ IDEA projects. See Installing, Updating and Uninstalling Repository Plugins and Enabling and Disabling Plugins for details.

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

Last modified: 12 November 2014
comments powered by Disqus