1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 21:20:24 +02:00

fix(testing): always clear cache in integration test's tearDown (#3818)

This prevent tests from interacting between each other through the cache.
This commit is contained in:
Nicolas Peugnet
2023-05-02 20:24:14 +02:00
committed by GitHub
parent d7fcd8a9e5
commit 3264455068

View File

@@ -16,6 +16,7 @@ use Flarum\Foundation\Paths;
use Flarum\Testing\integration\Extend\BeginTransactionAndSetDatabase;
use Flarum\Testing\integration\Extend\OverrideExtensionManagerForTests;
use Flarum\Testing\integration\Extend\SetSettingsBeforeBoot;
use Illuminate\Contracts\Cache\Store;
use Illuminate\Database\ConnectionInterface;
use Illuminate\Support\Arr;
use Laminas\Diactoros\ServerRequest;
@@ -36,6 +37,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase
parent::tearDown();
$this->database()->rollBack();
$this->app()->getContainer()->make(Store::class)->flush();
}
/**