We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
PreventsSavingStacheItemsToDisk
I can't figure out how, in an addon, to use Pest and the PreventsSavingStacheItemsToDisk trait. Every which way I try I get an error:
And the path is wonky too: /Users/erin/Development/events/vendor/pestphp/pest/src/Factories/tests/__fixtures__/dev-null
/Users/erin/Development/events/vendor/pestphp/pest/src/Factories/tests/__fixtures__/dev-null
Try to use the PreventsSavingStacheItemsToDisk in your add-on's Pest tests
It's an addon, there are no support details. However this was on the latest (5.41) version of Statamic and Laravel 11.
Fresh statamic/statamic site via CLI
No response
The text was updated successfully, but these errors were encountered:
I have this working in some add-ons. You just need to specify $fakeStacheDirectory and make sure the directory exists in setup.
abstract class TestCase extends AddonTestCase { use PreventsSavingStacheItemsToDisk; protected $fakeStacheDirectory = __DIR__.'/__fixtures__/dev-null'; protected string $addonServiceProvider = ServiceProvider::class; protected $shouldFakeVersion = true; protected function setUp(): void { parent::setUp(); if (! file_exists($this->fakeStacheDirectory)) { mkdir($this->fakeStacheDirectory, 0777, true); } } }
Sorry, something went wrong.
You can either push an empty directory (like we do in Core) or adjust your TestCase to handle it, like @ryanmitchell suggested.
TestCase
No branches or pull requests
Bug description
I can't figure out how, in an addon, to use Pest and the
PreventsSavingStacheItemsToDisk
trait. Every which way I try I get an error:And the path is wonky too:
/Users/erin/Development/events/vendor/pestphp/pest/src/Factories/tests/__fixtures__/dev-null
How to reproduce
Try to use the
PreventsSavingStacheItemsToDisk
in your add-on's Pest testsLogs
Environment
It's an addon, there are no support details. However this was on the latest (5.41) version of Statamic and Laravel 11.
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
The text was updated successfully, but these errors were encountered: