From 88ca712d3d9b0b1f7fa37687c7e7cc3c7f94f32c Mon Sep 17 00:00:00 2001 From: Corey Taylor Date: Fri, 14 Oct 2022 00:37:01 -0500 Subject: [PATCH] Remove unnecessary Connection pdo manipulation --- tests/TestCase/Command/Phinx/CacheBuildTest.php | 1 - tests/TestCase/Command/Phinx/CacheClearTest.php | 1 - tests/TestCase/Command/Phinx/CreateTest.php | 2 -- tests/TestCase/Command/Phinx/DumpTest.php | 3 --- tests/TestCase/Command/Phinx/MarkMigratedTest.php | 2 -- tests/TestCase/Command/Phinx/SeedTest.php | 2 -- 6 files changed, 11 deletions(-) diff --git a/tests/TestCase/Command/Phinx/CacheBuildTest.php b/tests/TestCase/Command/Phinx/CacheBuildTest.php index 806113f1..aba77681 100644 --- a/tests/TestCase/Command/Phinx/CacheBuildTest.php +++ b/tests/TestCase/Command/Phinx/CacheBuildTest.php @@ -68,7 +68,6 @@ public function tearDown(): void Cache::disable(); $this->connection->cacheMetadata(false); $this->connection->execute('DROP TABLE IF EXISTS blog'); - unset($this->connection, $this->command, $this->streamOutput); } /** diff --git a/tests/TestCase/Command/Phinx/CacheClearTest.php b/tests/TestCase/Command/Phinx/CacheClearTest.php index b41de841..6be60de4 100644 --- a/tests/TestCase/Command/Phinx/CacheClearTest.php +++ b/tests/TestCase/Command/Phinx/CacheClearTest.php @@ -66,7 +66,6 @@ public function tearDown(): void Cache::disable(); $this->connection->cacheMetadata(false); $this->connection->execute('DROP TABLE IF EXISTS blog'); - unset($this->connection, $this->command, $this->streamOutput); } /** diff --git a/tests/TestCase/Command/Phinx/CreateTest.php b/tests/TestCase/Command/Phinx/CreateTest.php index 5c30bc23..ee6e72b8 100644 --- a/tests/TestCase/Command/Phinx/CreateTest.php +++ b/tests/TestCase/Command/Phinx/CreateTest.php @@ -69,8 +69,6 @@ public function setUp(): void public function tearDown(): void { parent::tearDown(); - unset($this->connection, $this->command, $this->streamOutput); - foreach ($this->generatedFiles as $file) { if (file_exists($file)) { unlink($file); diff --git a/tests/TestCase/Command/Phinx/DumpTest.php b/tests/TestCase/Command/Phinx/DumpTest.php index b295e3c7..b476bfb7 100644 --- a/tests/TestCase/Command/Phinx/DumpTest.php +++ b/tests/TestCase/Command/Phinx/DumpTest.php @@ -97,13 +97,10 @@ public function setUp(): void public function tearDown(): void { parent::tearDown(); - - $this->connection->getDriver()->setConnection($this->pdo); $this->connection->execute('DROP TABLE IF EXISTS phinxlog'); $this->connection->execute('DROP TABLE IF EXISTS numbers'); $this->connection->execute('DROP TABLE IF EXISTS letters'); $this->connection->execute('DROP TABLE IF EXISTS parts'); - unset($this->connection, $this->command, $this->streamOutput); } /** diff --git a/tests/TestCase/Command/Phinx/MarkMigratedTest.php b/tests/TestCase/Command/Phinx/MarkMigratedTest.php index d4d8bf40..a7e82100 100644 --- a/tests/TestCase/Command/Phinx/MarkMigratedTest.php +++ b/tests/TestCase/Command/Phinx/MarkMigratedTest.php @@ -80,10 +80,8 @@ public function setUp(): void public function tearDown(): void { parent::tearDown(); - $this->connection->getDriver()->setConnection($this->pdo); $this->connection->execute('DROP TABLE IF EXISTS phinxlog'); $this->connection->execute('DROP TABLE IF EXISTS numbers'); - unset($this->connection, $this->commandTester, $this->command); } /** diff --git a/tests/TestCase/Command/Phinx/SeedTest.php b/tests/TestCase/Command/Phinx/SeedTest.php index a79ba171..6f8223e1 100644 --- a/tests/TestCase/Command/Phinx/SeedTest.php +++ b/tests/TestCase/Command/Phinx/SeedTest.php @@ -79,10 +79,8 @@ public function setUp(): void public function tearDown(): void { parent::tearDown(); - $this->connection->getDriver()->setConnection($this->pdo); $this->connection->execute('DROP TABLE IF EXISTS phinxlog'); $this->connection->execute('DROP TABLE IF EXISTS numbers'); - unset($this->connection, $this->command, $this->streamOutput); } /**