PhpStorm
 
2025.1
Get PhpStorm

Generate PHP tests

Last modified: 14 February 2025

The quick way to create a new test class in PhpStorm is by using a dedicated intention action that you can invoke from your source code. In this case, the IDE creates a new test class file and generates test stubs for the selected PHP class.

This action is available for PHPUnit, Pest, Codeception, and PHPSpec testing frameworks.