diff --git a/core/modules/system/src/Tests/File/DirectoryTest.php b/core/modules/system/src/Tests/File/DirectoryTest.php
index 4c15a8e..1c427c3 100644
--- a/core/modules/system/src/Tests/File/DirectoryTest.php
+++ b/core/modules/system/src/Tests/File/DirectoryTest.php
@@ -19,8 +19,7 @@ class DirectoryTest extends FileTestBase {
    * Test local directory handling functions.
    */
   function testFileCheckLocalDirectoryHandling() {
-    $site_path = $this->container->get('site.path');
-    $directory = $site_path . '/files';
+    $directory = 'public://';
 
     // Check a new recursively created local directory for correct file system
     // permissions.
@@ -28,18 +27,18 @@ function testFileCheckLocalDirectoryHandling() {
     $child = $this->randomMachineName();
 
     // Files directory already exists.
-    $this->assertTrue(is_dir($directory), t('Files directory already exists.'), 'File');
+    $this->assertTrue(is_dir($directory), 'Files directory already exists.', 'File');
     // Make files directory writable only.
     $old_mode = fileperms($directory);
 
     // Create the directories.
     $parent_path = $directory . DIRECTORY_SEPARATOR . $parent;
     $child_path = $parent_path . DIRECTORY_SEPARATOR . $child;
-    $this->assertTrue(drupal_mkdir($child_path, 0775, TRUE), t('No error reported when creating new local directories.'), 'File');
+    $this->assertTrue(drupal_mkdir($child_path, 0775, TRUE), 'No error reported when creating new local directories.', 'File');
 
     // Ensure new directories also exist.
-    $this->assertTrue(is_dir($parent_path), t('New parent directory actually exists.'), 'File');
-    $this->assertTrue(is_dir($child_path), t('New child directory actually exists.'), 'File');
+    $this->assertTrue(is_dir($parent_path), 'New parent directory actually exists.', 'File');
+    $this->assertTrue(is_dir($child_path), 'New child directory actually exists.', 'File');
 
     // Check that new directory permissions were set properly.
     $this->assertDirectoryPermissions($parent_path, 0775);
