diff -u b/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php --- b/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -1101,6 +1101,7 @@ // For a request URI of '/index.php/foo', $_SERVER['SCRIPT_NAME'] is // '/index.php', whereas $_SERVER['PHP_SELF'] is '/index.php/foo'. global $base_secure_url, $base_insecure_url; + // Create base URL. $base_path = $request->getBasePath(); // Requests to 'core/foo.php' bypass the front controller, causing diff -u b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php --- b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php +++ b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php @@ -13,7 +13,8 @@ * @group DrupalKernel */ class DrupalKernelTest extends UnitTestCase { - //Back up and restore any global variables that may be changed by tests. + + // Back up and restore any global variables that may be changed by tests. protected $backupGlobals = FALSE; /** @@ -196,9 +197,9 @@ /** * @covers ::initializeRequestGlobals - * @dataProvider initializeSettingsProvider + * @dataProvider initializeRequestGlobalsProvider */ - public function testInitializeSettings($path, $url, $expected_base_url, $expected_base_path, $expected_base_root) { + public function testInitializeRequestGlobals($path, $url, $expected_base_url, $expected_base_path, $expected_base_root) { global $base_url; global $base_path, $base_root; @@ -215,9 +216,9 @@ } /** - * Provides data for testInitializeSettings(). + * Provides data for testInitializeRequestGlobals(). */ - public function initializeSettingsProvider() { + public function initializeRequestGlobalsProvider() { return [ ['', 'http://localhost', 'http://localhost', '/', 'http://localhost'], ['/drupal', 'http://localhost', 'http://localhost/drupal', '/drupal/', 'http://localhost'],