X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Ffile%2Fsrc%2FTests%2FFileFieldRevisionTest.php;h=04fbcb8767f615affe1e3517ea08e3c8b25db093;hp=7de496ff8a5fb28d64863e382261d89fa94a765e;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/file/src/Tests/FileFieldRevisionTest.php b/web/core/modules/file/src/Tests/FileFieldRevisionTest.php index 7de496ff8..04fbcb876 100644 --- a/web/core/modules/file/src/Tests/FileFieldRevisionTest.php +++ b/web/core/modules/file/src/Tests/FileFieldRevisionTest.php @@ -22,6 +22,11 @@ class FileFieldRevisionTest extends FileFieldTestBase { * should be deleted also. */ public function testRevisions() { + // This test expects unused managed files to be marked as a temporary file + // and then deleted up by file_cron(). + $this->config('file.settings') + ->set('make_unused_managed_files_temporary', TRUE) + ->save(); $node_storage = $this->container->get('entity.manager')->getStorage('node'); $type_name = 'article'; $field_name = strtolower($this->randomMachineName()); @@ -63,7 +68,7 @@ class FileFieldRevisionTest extends FileFieldTestBase { // Save a new version of the node without any changes. // Check that the file is still the same as the previous revision. - $this->drupalPostForm('node/' . $nid . '/edit', ['revision' => '1'], t('Save and keep published')); + $this->drupalPostForm('node/' . $nid . '/edit', ['revision' => '1'], t('Save')); $node_storage->resetCache([$nid]); $node = $node_storage->load($nid); $node_file_r3 = File::load($node->{$field_name}->target_id);