diff --git a/tests/Integration/Cache/MemoizedStoreTest.php b/tests/Integration/Cache/MemoizedStoreTest.php index 1adc87283573..ecbdcc683b9b 100644 --- a/tests/Integration/Cache/MemoizedStoreTest.php +++ b/tests/Integration/Cache/MemoizedStoreTest.php @@ -18,29 +18,32 @@ use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Exceptions; use Illuminate\Support\Facades\Redis; +use Orchestra\Testbench\Attributes\WithConfig; use Orchestra\Testbench\TestCase; use Throwable; +#[WithConfig('cache.default', 'redis')] +#[WithConfig('cache.prefix', 'laravel_cache_')] class MemoizedStoreTest extends TestCase { use InteractsWithRedis; + /** {@inheritdoc} */ + #[\Override] protected function setUp(): void { - parent::setUp(); - - $this->setUpRedis(); + $this->afterApplicationCreated(function () { + $this->setUpRedis(); - Config::set('cache.default', 'redis'); - Redis::connection(Config::get('cache.stores.redis.connection'))->flushDb(); - Redis::connection(Config::get('cache.stores.redis.lock_connection'))->flushDb(); - } + Redis::connection(Config::get('cache.stores.redis.connection'))->flushDb(); + Redis::connection(Config::get('cache.stores.redis.lock_connection'))->flushDb(); + }); - protected function tearDown(): void - { - parent::tearDown(); + $this->beforeApplicationDestroyed(function () { + $this->tearDownRedis(); + }); - $this->tearDownRedis(); + parent::setUp(); } public function test_it_can_memoize_when_retrieving_single_value() diff --git a/tests/Illuminate/Tests/Container/BuildableIntegrationTest.php b/tests/Integration/Container/BuildableIntegrationTest.php similarity index 97% rename from tests/Illuminate/Tests/Container/BuildableIntegrationTest.php rename to tests/Integration/Container/BuildableIntegrationTest.php index b5912d14b0df..4fec6a7b611f 100644 --- a/tests/Illuminate/Tests/Container/BuildableIntegrationTest.php +++ b/tests/Integration/Container/BuildableIntegrationTest.php @@ -1,6 +1,6 @@