diff --git a/core/modules/simpletest/src/TestDiscovery.php b/core/modules/simpletest/src/TestDiscovery.php
index d3a72dd..ea78521 100644
--- a/core/modules/simpletest/src/TestDiscovery.php
+++ b/core/modules/simpletest/src/TestDiscovery.php
@@ -115,10 +115,7 @@ public function registerTestNamespaces() {
       $this->testNamespaces["Drupal\\$name\\Tests\\"][] = "$base_path/src/Tests";
 
       // Add PHPUnit test namespaces.
-      $this->testNamespaces["Drupal\\Tests\\$name\\Unit\\"][] = "$base_path/tests/src/Unit";
-      $this->testNamespaces["Drupal\\Tests\\$name\\Kernel\\"][] = "$base_path/tests/src/Kernel";
-      $this->testNamespaces["Drupal\\Tests\\$name\\Functional\\"][] = "$base_path/tests/src/Functional";
-      $this->testNamespaces["Drupal\\Tests\\$name\\FunctionalJavascript\\"][] = "$base_path/tests/src/FunctionalJavascript";
+      $this->testNamespaces["Drupal\\Tests\\$name\\"][] = "$base_path/tests/src";
     }
 
     foreach ($this->testNamespaces as $prefix => $paths) {
diff --git a/core/modules/simpletest/tests/src/TestTrait.php b/core/modules/simpletest/tests/src/TestTrait.php
new file mode 100644
index 0000000..c1d238e
--- /dev/null
+++ b/core/modules/simpletest/tests/src/TestTrait.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\simpletest;
+
+/**
+ * A nothing trait, but declared in the Drupal\Tests namespace.
+ *
+ * We use this trait to test autoloading of traits outside of the normal test
+ * suite namespaces.
+ *
+ * @see \Drupal\Tests\simpletest\Unit\TraitAccessTest
+ */
+trait TestTrait {
+
+  /**
+   * Random string for a not very interesting trait.
+   * @var string
+   */
+  protected $stuff = 'stuff';
+
+  /**
+   * Return a test string to a trait user.
+   *
+   * @return string
+   *  Just a random sort of string.
+   */
+  protected function getStuff() {
+    return $this->stuff;
+  }
+
+}
diff --git a/core/modules/simpletest/tests/src/Unit/TraitAccessTest.php b/core/modules/simpletest/tests/src/Unit/TraitAccessTest.php
new file mode 100644
index 0000000..0c1a739
--- /dev/null
+++ b/core/modules/simpletest/tests/src/Unit/TraitAccessTest.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace Drupal\Tests\simpletest\Unit;
+
+use Drupal\Tests\UnitTestCase;
+use Drupal\Tests\simpletest\TestTrait;
+
+/**
+ * Test whether traits are autoloaded during PHPUnit discovery time.
+ *
+ * @group simpletest
+ */
+class TraitAccessTest extends UnitTestCase {
+
+  use TestTrait;
+
+  /**
+   * @coversNothing
+   */
+  public function testSimpleStuff() {
+    $stuff = $this->getStuff();
+    $this->assertSame($stuff, 'stuff', "Same old stuff");
+  }
+
+}
