Images: Added testing to cover animated avif handling

This commit is contained in:
Dan Brown 2025-05-23 17:19:34 +01:00
parent 3a9d18a6cd
commit 131ac29df4
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
2 changed files with 14 additions and 1 deletions

View File

@ -68,7 +68,20 @@ class ImageTest extends TestCase
$this->files->deleteAtRelativePath($imgDetails['path']);
$this->assertStringContainsString('thumbs-', $imgDetails['response']->thumbs->gallery);
$this->assertStringNotContainsString('thumbs-', $imgDetails['response']->thumbs->display);
$this->assertStringNotContainsString('scaled-', $imgDetails['response']->thumbs->display);
}
public function test_image_display_thumbnail_generation_for_animated_avif_images_uses_original_file()
{
$page = $this->entities->page();
$admin = $this->users->admin();
$this->actingAs($admin);
$imgDetails = $this->files->uploadGalleryImageToPage($this, $page, 'animated.avif');
$this->files->deleteAtRelativePath($imgDetails['path']);
$this->assertStringContainsString('thumbs-', $imgDetails['response']->thumbs->gallery);
$this->assertStringNotContainsString('scaled-', $imgDetails['response']->thumbs->display);
}
public function test_image_edit()

Binary file not shown.