diff --git a/core/modules/system/src/Tests/Database/ConnectionUnitTest.php b/core/modules/system/src/Tests/Database/ConnectionUnitTest.php index 0d7e506..90c9b89 100644 --- a/core/modules/system/src/Tests/Database/ConnectionUnitTest.php +++ b/core/modules/system/src/Tests/Database/ConnectionUnitTest.php @@ -23,6 +23,20 @@ class ConnectionUnitTest extends KernelTestBase { protected $monitor; protected $originalCount; + /** + * Indicates whether the test should be skipped. + * + * @var bool + */ + protected $skipTest; + + /** + * The original target. + * + * @var string + */ + protected $originalTarget; + protected function setUp() { parent::setUp(); @@ -101,7 +115,7 @@ protected function assertNoConnection($id) { */ function testOpenClose() { if ($this->skipTest) { - return; + $this->markTestSkipped(); } // Add and open a new connection. $this->addConnection(); @@ -125,7 +139,7 @@ function testOpenClose() { */ function testOpenQueryClose() { if ($this->skipTest) { - return; + $this->markTestSkipped(); } // Add and open a new connection. $this->addConnection(); @@ -152,7 +166,7 @@ function testOpenQueryClose() { */ function testOpenQueryPrefetchClose() { if ($this->skipTest) { - return; + $this->markTestSkipped(); } // Add and open a new connection. $this->addConnection(); @@ -179,7 +193,7 @@ function testOpenQueryPrefetchClose() { */ function testOpenSelectQueryClose() { if ($this->skipTest) { - return; + $this->markTestSkipped(); } // Add and open a new connection. $this->addConnection(); @@ -222,6 +236,9 @@ function testOpenSelectQueryClose() { * Tests the serialization and unserialization of a database connection. */ public function testConnectionSerialization() { + if ($this->skipTest) { + $this->markTestSkipped(); + } $db = Database::getConnection('default', 'default'); try {