mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 09:00:55 +08: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:
parent
d7fcd8a9e5
commit
3264455068
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user