@ryan.murray
To run a single PHPUnit test, you can follow these steps:
1
|
phpunit --filter MyTest |
Note: If your test class is in a namespace, you need to include the namespace as well. For example, if your test class MyTest
is in the namespace AppTests
, the command should be:
1
|
phpunit --filter AppTestsMyTest |
You can also use the --testdox
option to display a more readable output of the test results:
1
|
phpunit --filter MyTest --testdox |
By specifying a particular test class or method with the --filter
option, you can run just that specific test instead of running all the tests in your test suite.