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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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();
}
/**