Skip to content

[5.x] Addon Testing Changes - #9871

Merged
jasonvarga merged 7 commits into
masterfrom
addon-testing-changes
Apr 12, 2024
Merged

[5.x] Addon Testing Changes#9871
jasonvarga merged 7 commits into
masterfrom
addon-testing-changes

Conversation

@duncanmcclean

@duncanmccleanduncanmcclean commented Apr 12, 2024

Copy link
Copy Markdown
Member

This pull request makes a couple of changes around addon testing:

  • Moves the AddonTestCase introduced in [5.x] Simplify TestCase for addons #9573 into the Statamic\Testing namespace
  • Makes the PreventSavingStacheItemsToDisk trait available for addons
    • This trait prevents Stache items from being kept around on the disk after the test suite has finished running.
    • I had to make some changes to the trait in order for the paths to be correct. Otherwise, the Stache files would live in vendor/statamic/cms/src/Testing/Concerns/__fixtures__.

Comment threadsrc/Testing/Concerns/PreventSavingStacheItemsToDisk.php
@jasonvarga
jasonvarga merged commit eded940 into masterApr 12, 2024
@jasonvarga
jasonvarga deleted the addon-testing-changes branch April 12, 2024 14:09
duncanmcclean added a commit to statamic/eloquent-driver that referenced this pull request Apr 12, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@duncanmcclean@jasonvarga