Skip to content

Commit 49d3d6e

Browse files
committed
Merge branch '7.4' into 8.0
* 7.4: Minor tweaks Document TEST_GENERATE_FIXTURES for snapshot tests
2 parents 28aa3fa + cada558 commit 49d3d6e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

contributing/code/tests.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,21 @@ 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 verify that it matches the expected
71+
output stored in a file. To regenerate those files, run the tests with the
72+
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+
.. versionadded:: 7.4
79+
80+
The ``TEST_GENERATE_FIXTURES`` environment variable was introduced in Symfony 7.4.
81+
6782
.. _`install Composer`: https://getcomposer.org/download/
6883
.. _Cmder: https://cmder.app/
6984
.. _ConEmu: https://conemu.github.io/

0 commit comments

Comments
 (0)