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
Discussion on replacing the StateChecker with database truncation in tests #7740
Comments
Hi @connorshea When you said:
Are you thinking in using something like Faker PHP Library? |
@Abuelodelanada not necessarily, we could have fixtures without Faker and instead hardcode values (though that can be a problem if people start relying on the exact contents of the fixtures, then they become really difficult to change). That said, I'd definitely like to have the tests run from a programmatically-created database state rather than the current SQL dump. e.g. creating the same records we do with the dump, but via PHP so it's easier to read and change. I'm not sure how much overhead that'd have over just loading the dump, though. |
…th database truncation in tests
…th database truncation in tests
Fixed #7740 - Discussion on replacing the StateChecker with database truncation in tests
This is now resolved in the next release! ❤️ |
I was hoping to start a discussion on the current StateChecker used for PHPUnit tests and whether we can replace it with a different solution.
I realize there's been a decent investment of time and energy into the feature, but I think it'd be best if we were to move from the StateChecker to truncating the database instead.
There are a few reasons I think it'd be beneficial to do this:
The biggest problems I foresee from making this change would be:
There may be things I don't know about the statechecker that are causing me to misunderstand things, and I'd be happy to be corrected if anything I said here was incorrect, but I hope this at least creates an interesting discussion to help us improve the test suite going forward.
Thanks :)
The text was updated successfully, but these errors were encountered: