diff --git a/core/modules/file/tests/src/Kernel/DeleteTest.php b/core/modules/file/tests/src/Kernel/DeleteTest.php
index 3b868c0..9f276ae 100644
--- a/core/modules/file/tests/src/Kernel/DeleteTest.php
+++ b/core/modules/file/tests/src/Kernel/DeleteTest.php
@@ -69,4 +69,29 @@ public function testInUse() {
     $this->assertFalse(File::load($file->id()), 'File was removed from the database.');
   }
 
+  /**
+   * Tries to run cron deletion on file deleted from the file-system.
+   */
+  public function testCronDeleteNonExistingTemporary() {
+    $file = $this->createFile();
+    // Delete the file, but leave it in the file_managed table.
+    file_unmanaged_delete($file->getFileUri());
+    $this->assertFalse(file_exists($file->getFileUri()), 'File is deleted from the filesystem.');
+    $this->assertTrue(File::load($file->id()), 'File exist in file_managed table');
+
+    // Call file_cron() to clean up the file. Make sure the changed timestamp
+    // of the file is older than the system.file.temporary_maximum_age
+    // configuration value.
+    \Drupal::database()->update('file_managed')
+      ->fields(array(
+        'changed' => \Drupal::time()->getRequestTime() - ($this->config('system.file')->get('temporary_maximum_age') + 1),
+      ))
+      ->condition('fid', $file->id())
+      ->execute();
+    \Drupal::service('cron')->run();
+    file_test_reset();
+
+    $this->assertFalse(File::load($file->id()), 'File was removed from the database.');
+  }
+
 }
