diff --git a/core/modules/simpletest/src/RouteProvider.php b/core/modules/simpletest/src/RouteProvider.php
deleted file mode 100644
index acff99a..0000000
--- a/core/modules/simpletest/src/RouteProvider.php
+++ /dev/null
@@ -1,114 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Core\ProxyClass\Routing\RouteProvider.
- */
-
-namespace Drupal\simpletest;
-
-use Drupal\Core\Routing\PreloadableRouteProviderInterface;
-use Symfony\Cmf\Component\Routing\PagedRouteProviderInterface;
-use Symfony\Component\HttpFoundation\Request;
-
-/**
- * Rebuilds the router when the provider is instantiated.
- */
-class RouteProvider implements PreloadableRouteProviderInterface, PagedRouteProviderInterface {
-
-  use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
-
-  /**
-   * Loads the real route provider from the container and rebuilds the router.
-   *
-   * @return \Drupal\Core\Routing\PreloadableRouteProviderInterface|\Symfony\Cmf\Component\Routing\PagedRouteProviderInterface|\Symfony\Component\EventDispatcher\EventSubscriberInterface
-   *   The route provider.
-   */
-  protected function lazyLoadItself() {
-    if (!isset($this->service)) {
-      $container = \Drupal::getContainer();
-      $this->service = $container->get('simpletest.router.route_provider');
-      $container->get('router.builder')->rebuild();
-    }
-
-    return $this->service;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getRouteCollectionForRequest(Request $request) {
-    return $this->lazyLoadItself()->getRouteCollectionForRequest($request);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getRouteByName($name) {
-    return $this->lazyLoadItself()->getRouteByName($name);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function preLoadRoutes($names){
-    return $this->lazyLoadItself()->preLoadRoutes($names);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getRoutesByNames($names) {
-    return $this->lazyLoadItself()->getRoutesByNames($names);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getCandidateOutlines(array $parts) {
-    return $this->lazyLoadItself()->getCandidateOutlines($parts);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getRoutesByPattern($pattern) {
-    return $this->lazyLoadItself()->getRoutesByPattern($pattern);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function routeProviderRouteCompare(array $a, array $b) {
-    return $this->lazyLoadItself()->routeProviderRouteCompare($a, $b);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getAllRoutes() {
-    return $this->lazyLoadItself()->getAllRoutes();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function reset() {
-    return $this->lazyLoadItself()->reset();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getRoutesPaged($offset, $length = NULL) {
-    return $this->lazyLoadItself()->getRoutesPaged($offset, $length);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getRoutesCount() {
-    return $this->lazyLoadItself()->getRoutesCount();
-  }
-
-}
diff --git a/core/modules/simpletest/src/TestServiceProvider.php b/core/modules/simpletest/src/TestServiceProvider.php
index 5a1a398..5aa9c8b 100644
--- a/core/modules/simpletest/src/TestServiceProvider.php
+++ b/core/modules/simpletest/src/TestServiceProvider.php
@@ -12,7 +12,7 @@
 use Drupal\Core\DependencyInjection\ServiceProviderInterface;
 use Symfony\Component\DependencyInjection\Definition;
 
-class TestServiceProvider implements ServiceProviderInterface, ServiceModifierInterface {
+class TestServiceProvider implements ServiceProviderInterface {
 
   /**
    * @var \Drupal\simpletest\TestBase;
@@ -28,20 +28,4 @@ function register(ContainerBuilder $container) {
     }
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function alter(ContainerBuilder $container) {
-    if (static::$currentTest instanceof KernelTestBase) {
-      // While $container->get() does a recursive resolve, getDefinition() does
-      // not, so do it ourselves.
-      foreach (['router.route_provider' => 'RouteProvider'] as $original_id => $class) {
-        for ($id = $original_id; $container->hasAlias($id); $id = (string) $container->getAlias($id));
-        $definition = $container->getDefinition($id);
-        $definition->clearTag('needs_destruction');
-        $container->setDefinition("simpletest.$original_id", $definition);
-        $container->setDefinition($id, new Definition('Drupal\simpletest\\' . $class));
-      }
-    }
-  }
 }
