Skip to content

Commit 0985fbe

Browse files
freekmurzeclaude
andcommitted
Fix event test by using array cache store
The file cache store returns false from flush() when its directory doesn't exist, causing ClearingResponseCacheFailedEvent to be dispatched instead of ClearedResponseCacheEvent. Switch to the array cache store for this test so clear() succeeds reliably. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2323785 commit 0985fbe

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/Commands/ClearCommandTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151
});
5252

5353
it('will fire events when clearing the cache', function () {
54+
$this->app['config']->set('responsecache.cache.store', 'array');
55+
$this->app->forgetInstance('responsecache');
56+
5457
Event::fake();
5558

5659
Artisan::call('responsecache:clear');

0 commit comments

Comments
 (0)