diff --git a/core/tests/Drupal/Tests/Core/Database/Driver/mysql/ConnectionTest.php b/core/modules/mysql/tests/src/Unit/ConnectionTest.php
similarity index 98%
rename from core/tests/Drupal/Tests/Core/Database/Driver/mysql/ConnectionTest.php
rename to core/modules/mysql/tests/src/Unit/ConnectionTest.php
index c103da733acf32c0676e072929276b9069d1c646..bb8bebbcbb8cf2f4407a51ca639cbf5b1cf3ce6d 100644
--- a/core/tests/Drupal/Tests/Core/Database/Driver/mysql/ConnectionTest.php
+++ b/core/modules/mysql/tests/src/Unit/ConnectionTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\Tests\Core\Database\Driver\mysql;
+namespace Drupal\Tests\mysql\Unit;
 
 use Drupal\mysql\Driver\Database\mysql\Connection;
 use Drupal\Tests\UnitTestCase;
diff --git a/core/tests/Drupal/Tests/Core/Database/Driver/mysql/install/TasksTest.php b/core/modules/mysql/tests/src/Unit/InstallTasksTest.php
similarity index 96%
rename from core/tests/Drupal/Tests/Core/Database/Driver/mysql/install/TasksTest.php
rename to core/modules/mysql/tests/src/Unit/InstallTasksTest.php
index b26a3ee77978daec16b63196b3f222b8bab5d4e1..8bc00310ff3b5ebcba07920e0f8041d4af09cbfb 100644
--- a/core/tests/Drupal/Tests/Core/Database/Driver/mysql/install/TasksTest.php
+++ b/core/modules/mysql/tests/src/Unit/InstallTasksTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\Tests\Core\Database\Driver\mysql\install;
+namespace Drupal\Tests\mysql\Unit;
 
 use Drupal\mysql\Driver\Database\mysql\Connection;
 use Drupal\mysql\Driver\Database\mysql\Install\Tasks;
@@ -12,7 +12,7 @@
  * @coversDefaultClass \Drupal\mysql\Driver\Database\mysql\Install\Tasks
  * @group Database
  */
-class TasksTest extends UnitTestCase {
+class InstallTasksTest extends UnitTestCase {
 
   /**
    * A connection object prophecy.
diff --git a/core/tests/Drupal/Tests/Core/Database/Driver/pgsql/PostgresqlSchemaTest.php b/core/modules/pgsql/tests/src/Unit/SchemaTest.php
similarity index 95%
rename from core/tests/Drupal/Tests/Core/Database/Driver/pgsql/PostgresqlSchemaTest.php
rename to core/modules/pgsql/tests/src/Unit/SchemaTest.php
index 0e50eb18408bc6045528db4905c8d49b093f3359..7673638143b2d194358dfaab8f01089fdbe82d77 100644
--- a/core/tests/Drupal/Tests/Core/Database/Driver/pgsql/PostgresqlSchemaTest.php
+++ b/core/modules/pgsql/tests/src/Unit/SchemaTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\Tests\Core\Database\Driver\pgsql;
+namespace Drupal\Tests\pgsql\Unit;
 
 use Drupal\pgsql\Driver\Database\pgsql\Schema;
 use Drupal\Tests\UnitTestCase;
@@ -11,7 +11,7 @@
  * @coversDefaultClass \Drupal\pgsql\Driver\Database\pgsql\Schema
  * @group Database
  */
-class PostgresqlSchemaTest extends UnitTestCase {
+class SchemaTest extends UnitTestCase {
 
   /**
    * The PostgreSql DB connection.
diff --git a/core/tests/Drupal/Tests/Core/Database/Driver/sqlite/ConnectionTest.php b/core/modules/sqlite/tests/src/Unit/ConnectionTest.php
similarity index 96%
rename from core/tests/Drupal/Tests/Core/Database/Driver/sqlite/ConnectionTest.php
rename to core/modules/sqlite/tests/src/Unit/ConnectionTest.php
index 3e52d6aecca88a5471b9468d80ca6c960c8651c2..1555d83f112eac0f09584ccf0c60c5be7c7aff49 100644
--- a/core/tests/Drupal/Tests/Core/Database/Driver/sqlite/ConnectionTest.php
+++ b/core/modules/sqlite/tests/src/Unit/ConnectionTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\Tests\Core\Database\Driver\sqlite;
+namespace Drupal\Tests\sqlite\Unit;
 
 use Drupal\sqlite\Driver\Database\sqlite\Connection;
 use Drupal\Tests\Core\Database\Stub\StubPDO;