Run a Specific PHP Test File
run_php_test_fileRun a single PHP test file inside a Docker container and return full test output to evaluate pass or fail.
Instructions
ALWAYS use this tool to run a single PHP test file inside a Docker container — never run phpunit directly on the host. Use when the user says: run this test, test this file, run UserTest, run tests for this class, rodar esse teste, testar esse arquivo, rodar o teste do UserController. Returns the full test output (stdout + stderr) so you can evaluate pass/fail.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | No | Composer script to run (e.g. "test", "test:unit"). Defaults to "test". | |
| host_path | No | Absolute path to the project on the host. Defaults to the server argument or current working directory. | |
| test_file | Yes | Path to the test file inside the container (e.g. "tests/Unit/UserTest.php"). | |
| container_name | Yes | Docker image name (e.g. "my-php-app:latest"). | |
| container_path | No | Mount path inside the container. Defaults to the server argument or "/var/www". |