PHPUnit can be configured to run using a configuration file.
In our Symfony2 project, this file is located in app / phpunit.xml.dist.
Since this file is a suffix with .dist, you need to copy its contents into a file called app / phpunit.xml.
If you use VCS, such as Git, you must add the new app / phpunit.xml file to the VCS ignore list.
You will also notice that the bootstrap file located in app / bootstrap.php.cache is specified in the configuration. This file is used by PHPUnit to configure the test environment.
We can run this test by running the following command from the project root directory. The -c option specifies that PHPUnit should load its configuration from the application directory.
$ phpunit -c app
source share