phpunitHow to install PHPUnit with Composer?
- Install Composer on your system.
- Create a
composer.json
file in the root of your project and add the following code:
{
"require-dev": {
"phpunit/phpunit": "^7.5"
}
}
- Run
composer install
in the root of your project. - Add the
vendor/bin
directory to yourPATH
environment variable. - Run
phpunit --version
to verify the installation.
Output example
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.
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...