Skip to content

Commit 2b6d28b

Browse files
committed
Updates related to the main PHPUnit configuration file
1 parent 3e180f7 commit 2b6d28b

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

bundles/best_practices.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ the ``tests/`` directory. Tests should follow the following principles:
188188
.. note::
189189

190190
A test suite must not contain ``AllTests.php`` scripts, but must rely on the
191-
existence of a ``phpunit.xml.dist`` file.
191+
existence of a ``phpunit.dist.xml`` file.
192192

193193
Continuous Integration
194194
----------------------

create_framework/unit_testing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ using `PHPUnit`_. At first, install PHPUnit as a development dependency:
1414
1515
$ composer require --dev phpunit/phpunit:^10.0
1616
17-
Then, create a PHPUnit configuration file in ``example.com/phpunit.xml.dist``:
17+
Then, create a PHPUnit configuration file in ``example.com/phpunit.dist.xml``:
1818

1919
.. code-block:: xml
2020

setup/upgrade_major.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ done!
114114

115115
.. code-block:: xml
116116
117-
<!-- phpunit.xml.dist -->
117+
<!-- phpunit.dist.xml -->
118118
<phpunit>
119119
<!-- ... -->
120120

testing.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,16 @@ This command automatically runs your application tests. Each test is a
5555
PHP class ending with "Test" (e.g. ``BlogControllerTest``) that lives in
5656
the ``tests/`` directory of your application.
5757

58-
PHPUnit is configured by the ``phpunit.xml.dist`` file in the root of your
59-
application. The default configuration provided by Symfony Flex will be
60-
enough in most cases. Read the `PHPUnit documentation`_ to discover all
61-
possible configuration options (e.g. to enable code coverage or to split
62-
your test into multiple "test suites").
58+
PHPUnit is configured by the ``phpunit.dist.xml`` file in the root of your
59+
application (in PHPUnit versions older than 10, the file is named ``phpunit.xml.dist``).
60+
The default configuration provided by Symfony Flex will be enough in most cases.
61+
Read the `PHPUnit documentation`_ to discover all possible configuration options
62+
(e.g. to enable code coverage or to split your test into multiple "test suites").
6363

6464
.. note::
6565

6666
:ref:`Symfony Flex <symfony-flex>` automatically creates
67-
``phpunit.xml.dist`` and ``tests/bootstrap.php``. If these files are
67+
``phpunit.dist.xml`` and ``tests/bootstrap.php``. If these files are
6868
missing, you can try running the recipe again using
6969
``composer recipes:install phpunit/phpunit --force -v``.
7070

@@ -81,7 +81,7 @@ By convention, the ``tests/`` directory should replicate the directory
8181
of your application for unit tests. So, if you're testing a class in the
8282
``src/Form/`` directory, put the test in the ``tests/Form/`` directory.
8383
Autoloading is automatically enabled via the ``vendor/autoload.php`` file
84-
(as configured by default in the ``phpunit.xml.dist`` file).
84+
(as configured by default in the ``phpunit.dist.xml`` file).
8585

8686
You can run tests using the ``bin/phpunit`` command:
8787

@@ -391,7 +391,7 @@ Now, enable it as a PHPUnit extension:
391391

392392
.. code-block:: xml
393393
394-
<!-- phpunit.xml.dist -->
394+
<!-- phpunit.dist.xml -->
395395
<phpunit>
396396
<!-- ... -->
397397

testing/bootstrap.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ You can modify this file to add custom logic:
3535
.. note::
3636

3737
If you don't use Symfony Flex, make sure this file is configured as
38-
bootstrap file in your ``phpunit.xml.dist`` file:
38+
bootstrap file in your ``phpunit.dist.xml`` file:
3939

4040
.. code-block:: xml
4141
42-
<!-- phpunit.xml.dist -->
42+
<!-- phpunit.dist.xml -->
4343
<?xml version="1.0" encoding="UTF-8" ?>
4444
<phpunit
4545
bootstrap="tests/bootstrap.php"

testing/end_to_end.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -872,12 +872,12 @@ Another option is to create a file called ``tests/router.php`` and add the follo
872872

873873
require $script;
874874

875-
Then declare it as a router for Panther server in ``phpunit.xml.dist`` using the
875+
Then declare it as a router for Panther server in ``phpunit.dist.xml`` using the
876876
``PANTHER_WEB_SERVER_ROUTER`` environment variable:
877877

878878
.. code-block:: xml
879879
880-
<!-- phpunit.xml.dist -->
880+
<!-- phpunit.dist.xml -->
881881
<phpunit>
882882
<!-- ... -->
883883
<php>

0 commit comments

Comments
 (0)