This is because to run a test case with the CLI you need to provide
- boostrap file
/app/bootstrap.php.cache - configuration file
app/phpunit.xml.dist
So, the command will look like this:
phpunit --configuration app/phpunit.xml.dist ----bootstrap /app/bootstrap.php.cache
Bootstrap can be provided in phpunit.xml.dist, as well as in the <phpunit> .
Another option, assuming that you have a good phpunit.xml.dist file, you need to go to the application directory and run the tests.
You can customize the paths to your needs.
source share