diff -u b/core/tests/Drupal/KernelTests/Core/Database/ConnectionUnitTest.php b/core/tests/Drupal/KernelTests/Core/Database/ConnectionUnitTest.php --- b/core/tests/Drupal/KernelTests/Core/Database/ConnectionUnitTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/ConnectionUnitTest.php @@ -221,11 +221,6 @@ $reflection = new \ReflectionObject($connection); $connection_property = $reflection->getProperty('connection'); $connection_property->setAccessible(TRUE); - // In case a database driver is implementing a non-PDO connection, skip - // this test. - if (get_class($connection_property->getValue($connection)) != 'PDO') { - $this->markTestSkipped('The database driver does not implement a PDO connection.'); - } $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.'); @@ -238,6 +233,11 @@ $reflection = new \ReflectionObject($connection); $connection_property = $reflection->getProperty('connection'); $connection_property->setAccessible(TRUE); + // In case a database driver is implementing a non-PDO connection, skip this test + // the driver should provide an alternative test. + if (get_class($connection_property->getValue($connection)) != 'PDO') { + $this->markTestSkipped('The database driver does not implement a PDO connection. The driver should provide an alternative test implementation.'); + } $error_mode = $connection_property->getValue($connection) ->getAttribute(\PDO::ATTR_ERRMODE); $this->assertEqual($error_mode, \PDO::ERRMODE_SILENT, 'Ensure PDO connection options can be overridden.');