Skip to content

Commit cce23ff

Browse files
committed
minor #21525 Document setting TEST_GENERATE_FIXTURES=1 to update snapshots (GromNaN)
This PR was merged into the 7.4 branch. Discussion ---------- Document setting `TEST_GENERATE_FIXTURES=1` to update snapshots Document this PR: symfony/symfony#62121 Commits ------- cd605ce Document TEST_GENERATE_FIXTURES for snapshot tests
2 parents 7985533 + cd605ce commit cce23ff

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

contributing/code/tests.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,18 @@ what's going on and if the tests are broken because of the new code.
6464
On Windows, install the `Cmder`_, `ConEmu`_, `ANSICON`_ or `Mintty`_ free applications
6565
to see colored test results.
6666

67+
Testing Generated Code
68+
----------------------
69+
70+
Some tests generate code on the fly and check that it matches expected stored in
71+
in a file. To regenerate those files, you can use the following approach, run
72+
the tests with the environment variable ``TEST_GENERATE_FIXTURES`` set to ``1``:
73+
74+
.. code-block:: terminal
75+
76+
$ TEST_GENERATE_FIXTURES=1 php ./phpunit src/Symfony/Component/Config/Tests/Builder/GeneratedConfigTest.php
77+
78+
6779
.. _`install Composer`: https://getcomposer.org/download/
6880
.. _Cmder: https://cmder.app/
6981
.. _ConEmu: https://conemu.github.io/

0 commit comments

Comments
 (0)