Skip to content

Commit cd605ce

Browse files
committed
Document TEST_GENERATE_FIXTURES for snapshot tests
1 parent 44d3761 commit cd605ce

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)