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. |
Beta Was this translation helpful? Give feedback.
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. |
Beta Was this translation helpful? Give feedback.
If you use the PreventsSavingStacheItemsToDisk trait:
Then you can use the entry/collection facades to make whatever you need to test.