diff --git a/bundles/best_practices.rst b/bundles/best_practices.rst index 99d254b7929..5f0259e074e 100644 --- a/bundles/best_practices.rst +++ b/bundles/best_practices.rst @@ -188,7 +188,7 @@ the ``tests/`` directory. Tests should follow the following principles: .. note:: A test suite must not contain ``AllTests.php`` scripts, but must rely on the - existence of a ``phpunit.xml.dist`` file. + existence of a ``phpunit.dist.xml`` file. Continuous Integration ---------------------- diff --git a/create_framework/unit_testing.rst b/create_framework/unit_testing.rst index f935a024b20..8d35b3a310c 100644 --- a/create_framework/unit_testing.rst +++ b/create_framework/unit_testing.rst @@ -14,7 +14,7 @@ using `PHPUnit`_. At first, install PHPUnit as a development dependency: $ composer require --dev phpunit/phpunit:^10.0 -Then, create a PHPUnit configuration file in ``example.com/phpunit.xml.dist``: +Then, create a PHPUnit configuration file in ``example.com/phpunit.dist.xml``: .. code-block:: xml diff --git a/setup/upgrade_major.rst b/setup/upgrade_major.rst index ab05f2b202b..bfd2714532e 100644 --- a/setup/upgrade_major.rst +++ b/setup/upgrade_major.rst @@ -114,7 +114,7 @@ done! .. code-block:: xml - + diff --git a/testing.rst b/testing.rst index 042f381caa6..31237e6344d 100644 --- a/testing.rst +++ b/testing.rst @@ -55,16 +55,16 @@ This command automatically runs your application tests. Each test is a PHP class ending with "Test" (e.g. ``BlogControllerTest``) that lives in the ``tests/`` directory of your application. -PHPUnit is configured by the ``phpunit.xml.dist`` file in the root of your -application. The default configuration provided by Symfony Flex will be -enough in most cases. Read the `PHPUnit documentation`_ to discover all -possible configuration options (e.g. to enable code coverage or to split -your test into multiple "test suites"). +PHPUnit is configured by the ``phpunit.dist.xml`` file in the root of your +application (in PHPUnit versions older than 10, the file is named ``phpunit.xml.dist``). +The default configuration provided by Symfony Flex will be enough in most cases. +Read the `PHPUnit documentation`_ to discover all possible configuration options +(e.g. to enable code coverage or to split your test into multiple "test suites"). .. note:: :ref:`Symfony Flex ` automatically creates - ``phpunit.xml.dist`` and ``tests/bootstrap.php``. If these files are + ``phpunit.dist.xml`` and ``tests/bootstrap.php``. If these files are missing, you can try running the recipe again using ``composer recipes:install phpunit/phpunit --force -v``. @@ -81,7 +81,7 @@ By convention, the ``tests/`` directory should replicate the directory of your application for unit tests. So, if you're testing a class in the ``src/Form/`` directory, put the test in the ``tests/Form/`` directory. Autoloading is automatically enabled via the ``vendor/autoload.php`` file -(as configured by default in the ``phpunit.xml.dist`` file). +(as configured by default in the ``phpunit.dist.xml`` file). You can run tests using the ``bin/phpunit`` command: @@ -391,7 +391,7 @@ Now, enable it as a PHPUnit extension: .. code-block:: xml - + diff --git a/testing/bootstrap.rst b/testing/bootstrap.rst index 59fc289f0be..83e8e55149b 100644 --- a/testing/bootstrap.rst +++ b/testing/bootstrap.rst @@ -35,11 +35,11 @@ You can modify this file to add custom logic: .. note:: If you don't use Symfony Flex, make sure this file is configured as - bootstrap file in your ``phpunit.xml.dist`` file: + bootstrap file in your ``phpunit.dist.xml`` file: .. code-block:: xml - + +