-
Notifications
You must be signed in to change notification settings - Fork 642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate entry fixtures being appended to each unit test #4663
Comments
@aaronbushnell Not able to reproduce this easily on my side. Can you share your |
Sure thing! Okay if I send it to you through Discord to not publicly share the schema? Also, I discovered something when testing this a bit further. It looks to be an issue for just one particular section that uses auto-generated titles through some custom fields. I tried disabling that and using a standard "Title" field and it worked as expected! Not sure why that would matter but perhaps that helps here a bit? |
@aaronbushnell Of course, discord is no problem! Re the auto-generated titles. I'll have a look - but that should definitely help me get started. |
Not able to reproduce this, either... @gtettelaar if you need help looking into it, feel free to ping me. |
Fixes a bug where `titleFormat` was changing the title stored in the DB so the value from the fixture data file was wrong.
The problem ended up being related to titles generated through a Reason for this is because when unloading fixtures through This supplied value, however, may be wrong. The actual title as stored in the DB will be the result of rendering the Fix for this is to edit |
Thanks a bunch, @gtettelaar! Looks like you've got a branch started that should fix this. If you need a tester just let me know. Otherwise I'll be on the lookout when this hits in a Craft release. Appreciate your help here! |
Description
When I use entry fixtures in my unit tests the number of entries keeps increasing with each test ran. It appears user fixtures work correctly, though!
Here's how my tests and fixtures are setup:
tests/fixtures/data/entries.php
tests/unit/ExampleTest.php
Additional info
The text was updated successfully, but these errors were encountered: