diff --git a/core/modules/file/src/Tests/FileOnTranslatedEntityTest.php b/core/modules/file/src/Tests/FileOnTranslatedEntityTest.php index c2f5d25..7987bcf 100644 --- a/core/modules/file/src/Tests/FileOnTranslatedEntityTest.php +++ b/core/modules/file/src/Tests/FileOnTranslatedEntityTest.php @@ -30,7 +30,9 @@ protected function setUp() { parent::setUp(); // Create the "Basic page" node type. - $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page')); + // @todo Remove the disabling of new revision creation in + // https://www.drupal.org/node/1239558. + $this->drupalCreateContentType(['type' => 'page', 'name' => 'Basic page', 'new_revision' => FALSE]); // Create a file field on the "Basic page" node type. $this->fieldName = strtolower($this->randomMachineName()); @@ -179,13 +181,8 @@ public function testSyncedFiles() { $this->assertTrue($file->isPermanent()); // Ensure the file status of the third file is now temporary. - // @todo As an effect of the bug from https://www.drupal.org/node/1239558 - // usages introduced by revisions are not released. Thus the file is not - // marked for removal and this test will fail. Uncomment the next two - // lines when fixing https://www.drupal.org/node/1239558. - // @see https://www.drupal.org/node/1239558 - // $file = File::load($third_fid); - // $this->assertTrue($file->isTemporary()); + $file = File::load($third_fid); + $this->assertTrue($file->isTemporary()); // Delete the all translations. $this->drupalPostForm('node/' . $default_language_node->id() . '/delete', array(), t('Delete all translations')); diff --git a/core/modules/image/src/Tests/ImageOnTranslatedEntityTest.php b/core/modules/image/src/Tests/ImageOnTranslatedEntityTest.php index e2484c3..a8985ce 100644 --- a/core/modules/image/src/Tests/ImageOnTranslatedEntityTest.php +++ b/core/modules/image/src/Tests/ImageOnTranslatedEntityTest.php @@ -30,7 +30,9 @@ protected function setUp() { parent::setUp(); // Create the "Basic page" node type. - $this->drupalCreateContentType(array('type' => 'basicpage', 'name' => 'Basic page')); + // @todo Remove the disabling of new revision creation in + // https://www.drupal.org/node/1239558. + $this->drupalCreateContentType(['type' => 'basicpage', 'name' => 'Basic page', 'new_revision' => FALSE]); // Create a image field on the "Basic page" node type. $this->fieldName = strtolower($this->randomMachineName()); @@ -204,13 +206,8 @@ public function testSyncedImages() { $this->assertTrue($file->isPermanent()); // Ensure the file status of the third file is now temporary. - // @todo As an effect of the bug from https://www.drupal.org/node/1239558 - // usages introduced by revisions are not released. Thus the file is not - // marked for removal and this test will fail. Uncomment the next two - // lines when fixing https://www.drupal.org/node/1239558. - // @see https://www.drupal.org/node/1239558 - // $file = File::load($third_fid); - // $this->assertTrue($file->isTemporary()); + $file = File::load($third_fid); + $this->assertTrue($file->isTemporary()); // Delete the all translations. $this->drupalPostForm('node/' . $default_language_node->id() . '/delete', array(), t('Delete all translations'));