diff --git a/tests/Integration/Cache/Database/MysqlCacheStoreTest.php b/tests/Integration/Cache/Database/DatabaseCacheStoreTest.php similarity index 91% rename from tests/Integration/Cache/Database/MysqlCacheStoreTest.php rename to tests/Integration/Cache/Database/DatabaseCacheStoreTest.php index 76f32fbb174c..af6b3f636343 100644 --- a/tests/Integration/Cache/Database/MysqlCacheStoreTest.php +++ b/tests/Integration/Cache/Database/DatabaseCacheStoreTest.php @@ -5,9 +5,9 @@ use Illuminate\Foundation\Testing\Concerns\InteractsWithCacheTable; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\DB; -use Illuminate\Tests\Integration\Database\MySql\MySqlTestCase; +use Illuminate\Tests\Integration\Database\DatabaseTestCase; -class MysqlCacheStoreTest extends MySqlTestCase +class DatabaseCacheStoreTest extends DatabaseTestCase { use InteractsWithCacheTable; diff --git a/tests/Integration/Cache/Database/PostgresCacheStoreTest .php b/tests/Integration/Cache/Database/PostgresCacheStoreTest .php deleted file mode 100644 index 181d89c22e67..000000000000 --- a/tests/Integration/Cache/Database/PostgresCacheStoreTest .php +++ /dev/null @@ -1,60 +0,0 @@ -createCacheTables(); - } - - protected function destroyDatabaseMigrations() - { - $this->dropCacheTables(); - } - - public function testValueCanStoreNewCache() - { - $store = $this->getStore(); - - $store->put('foo', 'bar', 60); - - $this->assertSame('bar', $store->get('foo')); - } - - public function testValueCanUpdateExistCache() - { - $store = $this->getStore(); - - $store->put('foo', 'bar', 60); - $store->put('foo', 'new-bar', 60); - - $this->assertSame('new-bar', $store->get('foo')); - } - - public function testValueCanUpdateExistCacheInTransaction() - { - $store = $this->getStore(); - - $store->put('foo', 'bar', 60); - - DB::beginTransaction(); - $store->put('foo', 'new-bar', 60); - DB::commit(); - - $this->assertSame('new-bar', $store->get('foo')); - } - - protected function getStore() - { - return Cache::store('database'); - } -} diff --git a/tests/Integration/Cache/Database/SqlServerCacheStoreTest.php b/tests/Integration/Cache/Database/SqlServerCacheStoreTest.php deleted file mode 100644 index ac9cef5a86bf..000000000000 --- a/tests/Integration/Cache/Database/SqlServerCacheStoreTest.php +++ /dev/null @@ -1,60 +0,0 @@ -createCacheTables(); - } - - protected function destroyDatabaseMigrations() - { - $this->dropCacheTables(); - } - - public function testValueCanStoreNewCache() - { - $store = $this->getStore(); - - $store->put('foo', 'bar', 60); - - $this->assertSame('bar', $store->get('foo')); - } - - public function testValueCanUpdateExistCache() - { - $store = $this->getStore(); - - $store->put('foo', 'bar', 60); - $store->put('foo', 'new-bar', 60); - - $this->assertSame('new-bar', $store->get('foo')); - } - - public function testValueCanUpdateExistCacheInTransaction() - { - $store = $this->getStore(); - - $store->put('foo', 'bar', 60); - - DB::beginTransaction(); - $store->put('foo', 'new-bar', 60); - DB::commit(); - - $this->assertSame('new-bar', $store->get('foo')); - } - - protected function getStore() - { - return Cache::store('database'); - } -}