From e8e98e318476d5d5d8a6b4108a6511be5c3f4ab6 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 13 Nov 2023 09:41:12 +0800 Subject: [PATCH] wip --- .../Concerns/InteractsWithCacheTable.php | 36 ------------------- .../Database/DatabaseCacheStoreTest.php | 15 ++------ 2 files changed, 2 insertions(+), 49 deletions(-) delete mode 100644 src/Illuminate/Foundation/Testing/Concerns/InteractsWithCacheTable.php diff --git a/src/Illuminate/Foundation/Testing/Concerns/InteractsWithCacheTable.php b/src/Illuminate/Foundation/Testing/Concerns/InteractsWithCacheTable.php deleted file mode 100644 index bf9cbfad6c1b..000000000000 --- a/src/Illuminate/Foundation/Testing/Concerns/InteractsWithCacheTable.php +++ /dev/null @@ -1,36 +0,0 @@ -string('key')->primary(); - $table->mediumText('value'); - $table->integer('expiration'); - }); - - Schema::create('cache_locks', function (Blueprint $table) { - $table->string('key')->primary(); - $table->string('owner'); - $table->integer('expiration'); - }); - } - - /** - * Drop all cache related table tables. - */ - protected function dropCacheTables() - { - Schema::dropIfExists('cache'); - Schema::dropIfExists('cache_locks'); - } -} diff --git a/tests/Integration/Database/DatabaseCacheStoreTest.php b/tests/Integration/Database/DatabaseCacheStoreTest.php index 6af08a7e3b0b..1f5bac9835d0 100644 --- a/tests/Integration/Database/DatabaseCacheStoreTest.php +++ b/tests/Integration/Database/DatabaseCacheStoreTest.php @@ -2,24 +2,13 @@ namespace Illuminate\Tests\Integration\Database; -use Illuminate\Foundation\Testing\Concerns\InteractsWithCacheTable; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\DB; +use Orchestra\Testbench\Attributes\WithMigration; +#[WithMigration('cache')] class DatabaseCacheStoreTest extends DatabaseTestCase { - use InteractsWithCacheTable; - - protected function defineDatabaseMigrationsAfterDatabaseRefreshed() - { - $this->createCacheTables(); - } - - protected function destroyDatabaseMigrations() - { - $this->dropCacheTables(); - } - public function testValueCanStoreNewCache() { $store = $this->getStore();