phpunitHow to launch one test with PHPUnit?
To launch one test with PHPUnit, you can use the following command:
phpunit <test_file_name>
For example, if you have a test file named MyTest.php
, you can launch it with:
phpunit MyTest.php
The command will execute the test and output the results.
phpunit
: The command to launch the test.<test_file_name>
: The name of the test file to be executed.
Helpful links
More of Phpunit
- How to stop PHPUnit on failure?
- How to skip a PHPUnit test?
- How to run PHPUnit in quiet mode?
- How to order tests with PHPUnit?
- How to install PHPUnit with a PHAR file?
- How to mock a method with different arguments in PHPUnit?
- How to mock a static method with PHPUnit?
- What are PHPUnit required extensions
- How to disable color output in PHPUnit?
- How to mock an interface in PHPUnit?
See more codes...