Skip to content

Conversation

@GromNaN
Copy link
Member

@GromNaN GromNaN commented Oct 20, 2025

Q A
Branch? 7.4
Bug fix? no
New feature? no
Deprecations? no
Issues -
License MIT

We do a lot of snapshot testing without saying so, comparing what is generated with what is expected, which we generated previously.

By adding a new generic environment variable TEST_GENERATE_FIXTURES=1, you can enable/disable regeneration without having to uncomment/recomment code.

@carsonbot carsonbot added this to the 7.4 milestone Oct 20, 2025
@carsonbot carsonbot changed the title Add env var to generate fixtures in tests Add env var to generate fixtures in tests Oct 20, 2025
@GromNaN GromNaN force-pushed the test-generate-fixtures branch from 5664410 to 0c6dc48 Compare October 20, 2025 21:03
Copy link
Member

@alexandre-daubois alexandre-daubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense

@GromNaN GromNaN changed the title Add env var to generate fixtures in tests Add TEST_GENERATE_FIXTURES=1 to generate fixtures in tests Oct 21, 2025
@nicolas-grekas
Copy link
Member

Thank you @GromNaN.

@nicolas-grekas nicolas-grekas merged commit 0608052 into symfony:7.4 Oct 21, 2025
12 checks passed
@GromNaN GromNaN deleted the test-generate-fixtures branch October 21, 2025 15:42
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull request Oct 30, 2025
…apshots (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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants