From 093c61fb6b71c311ca88509130169a49f285a819 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Tue, 21 May 2019 19:38:21 -0700 Subject: [PATCH] Removed the assertion which doesn't work with a user-provided PDO connection --- .../Tests/DBAL/Functional/ConnectionTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php b/tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php index b9d03d5e66c..beb11ffb715 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php @@ -12,6 +12,7 @@ use Doctrine\Tests\DbalFunctionalTestCase; use Error; use Exception; +use PDO; use RuntimeException; use Throwable; use function in_array; @@ -311,4 +312,16 @@ public function testDeterminesDatabasePlatformWhenConnectingToNonExistentDatabas $connection->close(); } + + /** + * @requires extension pdo_sqlite + */ + public function testUserProvidedPDOConnection() : void + { + self::assertTrue( + DriverManager::getConnection([ + 'pdo' => new PDO('sqlite::memory:'), + ])->ping() + ); + } }