diff --git a/core/modules/system/lib/Drupal/system/Tests/Routing/RouterTest.php b/core/modules/system/lib/Drupal/system/Tests/Routing/RouterTest.php
index 1cd383e..1293484 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Routing/RouterTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Routing/RouterTest.php
@@ -8,6 +8,7 @@
 namespace Drupal\system\Tests\Routing;
 
 use Drupal\simpletest\WebTestBase;
+use Symfony\Component\Routing\RequestContext;
 
 /**
  * Functional class for the full integrated routing system.
@@ -143,6 +144,24 @@ public function testControllerResolutionPage() {
   }
 
   /**
+   * Checks the generate method on the url generator using the front router.
+   */
+  public function testUrlGeneratorFront() {
+    // Setup the request context of the url generator. Note: Just calling the
+    // code without a proper request, does not setup the request context
+    // automatically.
+    $context = new RequestContext();
+    $context->fromRequest($this->container->get('request'));
+    $this->container->get('url_generator')->setRequest($this->container->get('request'));
+    $this->container->get('url_generator')->setContext($context);
+
+    global $base_path;
+
+    $this->assertEqual($this->container->get('url_generator')->generate('front'), $base_path);
+    $this->assertEqual($this->container->get('url_generator')->generateFromPath('<front>'), $base_path);
+  }
+
+  /**
    * Checks that an ajax request gets rendered as an Ajax response, by mime.
    *
    * @todo This test will not work until the Ajax enhancer is corrected. However,
diff --git a/core/modules/system/system.routing.yml b/core/modules/system/system.routing.yml
index 017d486..47edb3b 100644
--- a/core/modules/system/system.routing.yml
+++ b/core/modules/system/system.routing.yml
@@ -193,6 +193,11 @@ system_theme_settings_global:
   requirements:
     _permission: 'administer themes'
 
+front:
+  pattern: '/'
+  requirements:
+    _access: 'TRUE'
+
 system_modules_uninstall:
   pattern: 'admin/modules/uninstall'
   defaults:
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index 49b1a44..091af6c 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -304,6 +304,7 @@ function simpletest_script_init($server_software) {
   $_SERVER['REQUEST_URI'] = $path .'/';
   $_SERVER['REQUEST_METHOD'] = 'GET';
   $_SERVER['SCRIPT_NAME'] = $path .'/index.php';
+  $_SERVER['SCRIPT_FILENAME'] = $path .'/index.php';
   $_SERVER['PHP_SELF'] = $path .'/index.php';
   $_SERVER['HTTP_USER_AGENT'] = 'Drupal command line';
 
