generate_test
Generate PHPUnit test files for PHP classes, automatically creating test methods for each public method. Supports unit and feature test types.
Instructions
Generate a PHPUnit test file for an existing class. Creates test methods for each public method in the target class.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to the PHP class to generate tests for | |
| rootNamespace | Yes | Plugin root namespace | |
| testType | No | Test type (default: unit) |