diff --git a/core/tests/Drupal/KernelTests/Core/Database/ConnectionUnitTest.php b/core/tests/Drupal/KernelTests/Core/Database/ConnectionUnitTest.php index 6edcef821aa87b4dd437585d601e8f0ca79e7be5..f73f4155fb489ea67e75a7ca33d560707b84dc9f 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/ConnectionUnitTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/ConnectionUnitTest.php @@ -221,6 +221,12 @@ public function testConnectionOpen() { $reflection = new \ReflectionObject($connection); $connection_property = $reflection->getProperty('connection'); $connection_property->setAccessible(TRUE); + // Skip this test when a database driver does not implement PDO. + // An alternative database driver that does not implement PDO + // should implement its own connection test. + if (get_class($connection_property->getValue($connection)) !== 'PDO') { + $this->markTestSkipped('Ignored PDO connection unit test for this driver because it does not implement PDO.'); + } $error_mode = $connection_property->getValue($connection) ->getAttribute(\PDO::ATTR_ERRMODE); $this->assertEqual($error_mode, \PDO::ERRMODE_EXCEPTION, 'Ensure the default error mode is set to exception.');