diff --git a/core/modules/system/lib/Drupal/system/Tests/Routing/RouteProviderTest.php b/core/modules/system/lib/Drupal/system/Tests/Routing/RouteProviderTest.php
index 01f651e..52a88c9 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Routing/RouteProviderTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Routing/RouteProviderTest.php
@@ -329,7 +329,7 @@ function testOutlinePathNoMatch() {
       $routes = $provider->getRoutesByPattern($path);
       $this->assertFalse(count($routes), 'No path found with this pattern.');
 
-      $routes = $provider->getRouteCollectionForRequest($request);
+      $provider->getRouteCollectionForRequest($request);
       $this->fail(t('No exception was thrown.'));
     }
     catch (\Exception $e) {
