Is there a difference in the name of the PHPunit configuration file phpunit.xml.dist or phpunit.xml

Can someone explain to me what is the difference between using PHPunit configuration files with the name phpunit.xml.distor phpunit.xml.

The official documentation mentions both names:

The PHPUnit XML configuration file (Appendix C) can also be used to compile a test suite. Example 5.1 shows the minimum phpunit.xml file that will add all * Test classes that are in the * Test.php files when the test directory is recursively passed.

with phpunit.xmla higher priority when loading a configuration without a parameter configuration.

If phpunit.xml or phpunit.xml.dist (in that order) exists in the current working directory and --configuration is not used, the configuration will be automatically read from this file.

I found several questions (for example, this .xml.dist file should really be used ) related to the fact that files are usually used .distas a template (distribution), which must be copied to the version without ending .distin order to activate them (for example, .htaccess.dist). But this doesn't seem to be the case with PHPunit, as it raises and runs the dist file. Other questions ( Can I use phpunit.xml for credentials and phpunit.xml.dist for testuites? ) Seem to be dealing with other weird ideas for using these two files.

Symfony phpunit.xml.dist, , phpunit.xml .

AllTests.php, phpunit.xml.dist.

, - , ; -)

+4
2

phpunit.xml phpunit.xml.dist ( ) , --configuration , .

(phpunit.xml.dist, phpunit.xml ) , phpunit.xml.dist , phpunit.xml . , .

+9

.dist git, , phpunit.xml, .

.dist ,

phpunit.xml phpunit.xml.dist phpunit phpunit.xml

phpunit.xml.dist , phpunit.xml. , .

+1

Source: https://habr.com/ru/post/1680130/


All Articles