diff --git a/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php b/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php
index 03dd8cb..dc5980b 100644
--- a/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php
+++ b/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php
@@ -2,7 +2,9 @@
 
 namespace Drupal\language\Tests;
 
+use Drupal\Core\Cache\Cache;
 use Drupal\Core\Url;
+use Drupal\file\Entity\File;
 use Drupal\language\Entity\ConfigurableLanguage;
 use Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationBrowser;
 use Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationSelected;
@@ -40,6 +42,13 @@
 class LanguageUILanguageNegotiationTest extends WebTestBase {
 
   /**
+   * The admin user for testing.
+   *
+   * @var \Drupal\user\Entity\User
+   */
+  protected $adminUser;
+
+  /**
    * Modules to enable.
    *
    * We marginally use interface translation functionality here, so need to use
@@ -53,8 +62,8 @@ class LanguageUILanguageNegotiationTest extends WebTestBase {
   protected function setUp() {
     parent::setUp();
 
-    $admin_user = $this->drupalCreateUser(array('administer languages', 'translate interface', 'access administration pages', 'administer blocks'));
-    $this->drupalLogin($admin_user);
+    $this->adminUser = $this->drupalCreateUser(array('administer languages', 'translate interface', 'access administration pages', 'administer blocks'));
+    $this->drupalLogin($this->adminUser);
   }
 
   /**
@@ -73,6 +82,17 @@ function testUILanguageNegotiation() {
     // For setting browser language preference to some unknown.
     $http_header_blah = array("Accept-Language: blah;q=1");
 
+    // Create a private file for testing accessible by the admin user.
+    drupal_mkdir($this->privateFilesDirectory . '/test');
+    $filepath = 'private://test/private-file-test.txt';
+    $contents = "file_put_contents() doesn't seem to appreciate empty strings so let's put in some data.";
+    file_put_contents($filepath, $contents);
+    $file = File::create([
+      'uri' => $filepath,
+      'uid' => $this->adminUser->id(),
+    ]);
+    $file->save();
+
     // Setup the site languages by installing two languages.
     // Set the default language in order for the translated string to be registered
     // into database when seen by t(). Without doing this, our target string
@@ -359,6 +379,13 @@ protected function doRunTest($test) {
     $this->drupalGet($test['path'], $test['path_options'], $test['http_header']);
     $this->assertText($test['expect'], $test['message']);
     $this->assertText(t('Language negotiation method: @name', array('@name' => $test['expected_method_id'])));
+
+    // Get the private file and ensure it is a 200. It is important to
+    // invalidate the router cache to ensure the routing system runs a full
+    // match.
+    Cache::invalidateTags(['route_match']);
+    $this->drupalGet('system/files/test/private-file-test.txt');
+    $this->assertResponse(200);
   }
 
   /**
