diff --git a/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedCopyTest.php b/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedCopyTest.php
index acae92b..847ff98 100644
--- a/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedCopyTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedCopyTest.php
@@ -45,6 +45,11 @@ function testNormal() {
     $this->assertTrue(file_exists($newer_filepath), 'New file exists.');
     $this->assertFilePermissions($newer_filepath, settings()->get('file_chmod_file', FILE_CHMOD_FILE));
 
+    // Make sure file_unmanaged_copy creates the folder structure.
+    $desired_filepath = 'public://inside/folder/' . $this->randomName();
+    $newer_filepath = file_unmanaged_copy($uri, $desired_filepath);
+    $this->assertEqual($newer_filepath, $desired_filepath, 'Folders were created successfully.');
+
     // TODO: test copying to a directory (rather than full directory/file path)
     // TODO: test copying normal files using normal paths (rather than only streams)
   }
