PhpStorm 8.0.0 Web Help

File | Settings | Languages and Frameworks | PHP | PHPUnit


The page is available only when the PHP plugin is enabled. The plugin is bundled with PhpStorm and activated by default. If not, enable it as described in Enabling and Disabling Plugins.

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 PhpStorm 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 PhpStorm download it automatically.

      In either case, PhpStorm 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: