Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


For this tutorial, let's go with PHPUnit support via PHAR file. From the Settings (Preferences on Mac) | Languages & Frameworks | PHP | PHPUnit, we can specify how we want to load PHPUnit. The options presented are the same options as described above (include path, Composer or PHAR). We don't have to grab the phpunit.phar file from ourselves: we can let PhpStorm download it for us.

Let's go ahead and download PHPUnit PHAR file into a root folder of our project.

Optionally, we can also specify the path to a phpunit.xml configuration file, or the path to a bootstrap file (to run arbitrary PHP code before unit tests run).

After closing the settings and giving IDE some time to index a new archive in a project, we now get full autocompletion support on all PHPUnit's classes and functions: