phpunitHow to use filters with PHPUnit?
Filters can be used with PHPUnit to limit the tests that are run. This is useful when you want to focus on a specific set of tests.
Example
$ phpunit --filter testName
This will run only the tests that match the given name.
Code explanation
phpunit
- This is the command used to run the tests.--filter
- This is the flag used to specify the filter.testName
- This is the name of the test to be run.
Helpful links
More of Phpunit
- How to skip a PHPUnit test?
- How to run tests in parallel with PHPUnit?
- How to use hooks in PHPUnit?
- What are PHPUnit required extensions
- How to use the PHPUnit Framework TestCase?
- How to run PHPUnit in quiet mode?
- How to show warnings in PHPUnit?
- How to load fixtures with PHPUnit?
- How to use a listener with PHPUnit?
- How to stop PHPUnit on failure?
See more codes...