The phpunit.xml
file is the default name for the PHPUnit XML configuration file. When you run PHPUnit from the command line, it checks if the file is available, and then tries to use it to execute the tests. The phpunit.xml
file is the default and recommended filename, but you can use any file name you like. In the command line, you need to use the switch -c
or --configuration XX
, where XX
is the name of your configuration file, as shown in the following command line:
>phpunit --configuration config.xml
In Chapter 5, Running Tests from the Command Line, we saw many switches that you can use when running tests. Most of these switches you can use as an attribute in the configuration file instead of passing them as a switch on the command line. Of course, it's up to you if you prefer to write a simple script that will hold all the switches you use, but a better place for them is the XML configuration file, because you have all things in one place and by...