Repository navigation
Testing Statamic Entries #13002
|
Is there a standardized way to run tests on statamic entries, including creating mock entries (and cleaning them up)? For example, I would like to test that viewing entries from certain collections don't throw errors, etc. I have only found references for testing addons and other extensions in the official docs, plus this community created trait: https://gist.github.com/yoeriboven/08f751dc7beba7452491c148cea806d5. |
Answered by
ryanmitchell
Nov 11, 2025
Replies: 1 comment 1 reply
|
If you use the PreventsSavingStacheItemsToDisk trait: Then you can use the entry/collection facades to make whatever you need to test. |
1 reply
Answer selected by
ozmos
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you use the PreventsSavingStacheItemsToDisk trait:
Then you can use the entry/collection facades to make whatever you need to test.