From 2159fbee561c21769ae45c11983d7650057c2ea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Fri, 10 Sep 2021 21:08:01 +0200 Subject: [PATCH 1/2] Drop unused test base classes They are no longer needed since e4c7fa961e334e0b834efbd0e99ad843c00a256a --- phpcs.xml.dist | 1 - .../Doctrine/Tests/DbalFunctionalTestCase.php | 39 ------------------- tests/Doctrine/Tests/DbalTestCase.php | 12 ------ 3 files changed, 52 deletions(-) delete mode 100644 tests/Doctrine/Tests/DbalFunctionalTestCase.php delete mode 100644 tests/Doctrine/Tests/DbalTestCase.php diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 7283243528a..29cb5464f3c 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -247,7 +247,6 @@ lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php - tests/Doctrine/Tests/DbalFunctionalTestCase.php tests/Doctrine/Tests/OrmFunctionalTestCase.php diff --git a/tests/Doctrine/Tests/DbalFunctionalTestCase.php b/tests/Doctrine/Tests/DbalFunctionalTestCase.php deleted file mode 100644 index 8767a845131..00000000000 --- a/tests/Doctrine/Tests/DbalFunctionalTestCase.php +++ /dev/null @@ -1,39 +0,0 @@ -sharedFixture['conn'] = null; - self::$_sharedConn = null; - } - - protected function setUp(): void - { - if (isset($this->sharedFixture['conn'])) { - $this->_conn = $this->sharedFixture['conn']; - } else { - if (! isset(self::$_sharedConn)) { - self::$_sharedConn = TestUtil::getConnection(); - } - - $this->_conn = self::$_sharedConn; - } - } -} diff --git a/tests/Doctrine/Tests/DbalTestCase.php b/tests/Doctrine/Tests/DbalTestCase.php deleted file mode 100644 index a7270774d1c..00000000000 --- a/tests/Doctrine/Tests/DbalTestCase.php +++ /dev/null @@ -1,12 +0,0 @@ - Date: Fri, 10 Sep 2021 21:11:16 +0200 Subject: [PATCH 2/2] Remove unused performance base test class It is unused since b960170fe1f4caef762cf2837be3340ae472c120 --- .../Doctrine/Tests/OrmPerformanceTestCase.php | 54 ------------------- 1 file changed, 54 deletions(-) delete mode 100644 tests/Doctrine/Tests/OrmPerformanceTestCase.php diff --git a/tests/Doctrine/Tests/OrmPerformanceTestCase.php b/tests/Doctrine/Tests/OrmPerformanceTestCase.php deleted file mode 100644 index e9e18c22456..00000000000 --- a/tests/Doctrine/Tests/OrmPerformanceTestCase.php +++ /dev/null @@ -1,54 +0,0 @@ -maxRunningTime !== 0 && $time > $this->maxRunningTime) { - $this->fail( - sprintf( - 'expected running time: <= %s but was: %s', - $this->maxRunningTime, - $time - ) - ); - } - } - - /** - * @throws InvalidArgumentException - */ - public function setMaxRunningTime(int $maxRunningTime): void - { - if (is_int($maxRunningTime) && $maxRunningTime >= 0) { - $this->maxRunningTime = $maxRunningTime; - } else { - throw new InvalidArgumentException(); - } - } - - public function getMaxRunningTime(): int - { - return $this->maxRunningTime; - } -}