Skip to content

Commit 3264455

Browse files
authored
fix(testing): always clear cache in integration test's tearDown (#3818)
This prevent tests from interacting between each other through the cache.
1 parent d7fcd8a commit 3264455

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

php-packages/testing/src/integration/TestCase.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Flarum\Testing\integration\Extend\BeginTransactionAndSetDatabase;
1717
use Flarum\Testing\integration\Extend\OverrideExtensionManagerForTests;
1818
use Flarum\Testing\integration\Extend\SetSettingsBeforeBoot;
19+
use Illuminate\Contracts\Cache\Store;
1920
use Illuminate\Database\ConnectionInterface;
2021
use Illuminate\Support\Arr;
2122
use Laminas\Diactoros\ServerRequest;
@@ -36,6 +37,7 @@ protected function tearDown(): void
3637
parent::tearDown();
3738

3839
$this->database()->rollBack();
40+
$this->app()->getContainer()->make(Store::class)->flush();
3941
}
4042

4143
/**

0 commit comments

Comments
 (0)