diff --git a/core/modules/file/src/Tests/FileOnTranslatedEntityTest.php b/core/modules/file/src/Tests/FileOnTranslatedEntityTest.php index fd83e48..c9a3fb1 100644 --- a/core/modules/file/src/Tests/FileOnTranslatedEntityTest.php +++ b/core/modules/file/src/Tests/FileOnTranslatedEntityTest.php @@ -133,10 +133,9 @@ public function testSyncedFiles() { \Drupal::entityTypeManager()->getStorage('file')->resetCache(); - // Ensure the first file still exists. Calling isPermanent() would crash - // the test suite. + // Ensure the first file is untouched. $file = File::load($first_fid); - $this->assertTrue(!empty($file) && $file->isPermanent(), 'First file still exists and is permanent.'); + $this->assertTrue($file->isPermanent(), 'First file still exists and is permanent.'); // This inspects the HTML after the post of the translation, the file // should be displayed on the original node. $this->assertRaw('file--mime-text-plain'); @@ -164,7 +163,7 @@ public function testSyncedFiles() { // Ensure the first and third files are untouched. $file = File::load($first_fid); - $this->assertTrue(!empty($file) && $file->isPermanent(), 'First file still exists and is permanent.'); + $this->assertTrue($file->isPermanent(), 'First file still exists and is permanent.'); $file = File::load($third_fid); $this->assertTrue($file->isPermanent()); @@ -184,7 +183,7 @@ public function testSyncedFiles() { // Ensure the first and replaced second files are untouched. $file = File::load($first_fid); - $this->assertTrue(!empty($file) && $file->isPermanent(), 'First file still exists and is permanent.'); + $this->assertTrue($file->isPermanent(), 'First file still exists and is permanent.'); $file = File::load($replaced_second_fid); $this->assertTrue($file->isPermanent());