diff --git a/src/Tests/CropFunctionalTest.php b/src/Tests/CropFunctionalTest.php index d11605b..8dd93b3 100644 --- a/src/Tests/CropFunctionalTest.php +++ b/src/Tests/CropFunctionalTest.php @@ -184,9 +184,12 @@ class CropFunctionalTest extends WebTestBase { $this->assertFalse(strpos($altered_image_style_url, $old_hash) !== FALSE, 'The image style URL does not contain the old hash.'); $this->assertTrue(strpos($altered_image_style_url, $new_hash) !== FALSE, 'The image style URL contains an updated hash.'); - // Delete the file and the crop entity. + // Delete the file and the crop entity associated, + // the crop entity are auto cleaned by crop_file_delete(). $file->delete(); - $crop->delete(); + + // Check if crop entity are correctly deleted. + $this->assertFalse(Crop::cropExists($file_uri), 'The Crop entity are correctly deleted after file delete.'); } }