1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2026-01-03 23:42:28 +03:00

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
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.

After

Width:  |  Height:  |  Size: 1.1 KiB