diff --git a/core/modules/simpletest/src/TestDiscovery.php b/core/modules/simpletest/src/TestDiscovery.php
index 132694607c..99c702d17d 100644
--- a/core/modules/simpletest/src/TestDiscovery.php
+++ b/core/modules/simpletest/src/TestDiscovery.php
@@ -270,9 +270,6 @@ public function findAllClassFiles($extension = NULL) {
    *
    * @throws \InvalidArgumentException
    *   If $namespace_prefix does not end in a namespace separator (backslash).
-   *
-   * @todo Limit to '*Test.php' files (~10% less files to reflect/introspect).
-   * @see https://www.drupal.org/node/2296635
    */
   public static function scanDirectory($namespace_prefix, $path) {
     if (substr($namespace_prefix, -1) !== '\\') {
@@ -288,7 +285,10 @@ public static function scanDirectory($namespace_prefix, $path) {
       if ($iterator->hasChildren()) {
         return TRUE;
       }
-      return $current->isFile() && $current->getExtension() === 'php';
+      if ($current->isFile() && $current->getExtension() === 'php') {
+        return strpos($current->getFilename(), 'Test.php') !== FALSE;
+      }
+      return FALSE;
     });
     $files = new \RecursiveIteratorIterator($filter);
     $classes = [];
diff --git a/core/modules/simpletest/tests/src/Unit/TestDiscoveryTest.php b/core/modules/simpletest/tests/src/Unit/TestDiscoveryTest.php
index 625297e439..92f1134ffd 100644
--- a/core/modules/simpletest/tests/src/Unit/TestDiscoveryTest.php
+++ b/core/modules/simpletest/tests/src/Unit/TestDiscoveryTest.php
@@ -277,10 +277,10 @@ class FunctionalExampleTest {}
             'src' => [
               'Functional' => [
                 'FunctionalExampleTest.php' => $test_file,
-                'FunctionalExampleTest2.php' => str_replace(['FunctionalExampleTest', '@group example'], ['FunctionalExampleTest2', '@group example2'], $test_file),
+                'FunctionalExample2Test.php' => str_replace(['FunctionalExampleTest', '@group example'], ['FunctionalExample2Test', '@group example2'], $test_file),
               ],
               'Kernel' => [
-                'KernelExampleTest3.php' => str_replace(['FunctionalExampleTest', '@group example'], ['KernelExampleTest3', '@group example2'], $test_file),
+                'KernelExample3Test.php' => str_replace(['FunctionalExampleTest', '@group example'], ['KernelExample3Test', '@group example2'], $test_file),
               ],
             ],
           ],
@@ -315,14 +315,14 @@ public function testGetTestClasses() {
         ],
       ],
       'example2' => [
-        'Drupal\Tests\test_module\Functional\FunctionalExampleTest2' => [
-          'name' => 'Drupal\Tests\test_module\Functional\FunctionalExampleTest2',
+        'Drupal\Tests\test_module\Functional\FunctionalExample2Test' => [
+          'name' => 'Drupal\Tests\test_module\Functional\FunctionalExample2Test',
           'description' => 'Test description',
           'group' => 'example2',
           'type' => 'PHPUnit-Functional',
         ],
-        'Drupal\Tests\test_module\Kernel\KernelExampleTest3' => [
-          'name' => 'Drupal\Tests\test_module\Kernel\KernelExampleTest3',
+        'Drupal\Tests\test_module\Kernel\KernelExample3Test' => [
+          'name' => 'Drupal\Tests\test_module\Kernel\KernelExample3Test',
           'description' => 'Test description',
           'group' => 'example2',
           'type' => 'PHPUnit-Kernel',
@@ -350,8 +350,8 @@ public function testGetTestClassesWithSelectedTypes() {
     $this->assertEquals([
       'example' => [],
       'example2' => [
-        'Drupal\Tests\test_module\Kernel\KernelExampleTest3' => [
-          'name' => 'Drupal\Tests\test_module\Kernel\KernelExampleTest3',
+        'Drupal\Tests\test_module\Kernel\KernelExample3Test' => [
+          'name' => 'Drupal\Tests\test_module\Kernel\KernelExample3Test',
           'description' => 'Test description',
           'group' => 'example2',
           'type' => 'PHPUnit-Kernel',
