This commit is contained in:
hashbro
2026-08-24 06:49:07 +08:00
parent db574cc629
commit 2eb081cbb8
18 changed files with 436 additions and 40 deletions
+12
View File
@@ -20,6 +20,18 @@ class PhotoPreviewTest extends TestCase
$this->assertFalse($preview->headLooksHeic(''));
}
#[Test]
public function heic_without_throwing_when_system_bins_are_outside_basedir(): void
{
Storage::fake('local');
$abs = sys_get_temp_dir().'/preview_'.uniqid().'.heic';
file_put_contents($abs, "\x00\x00\x00\x18ftypheic\x00\x00\x00\x00mif1");
$out = (new PhotoPreview)->payload($abs, 'dev-prev', hash('sha256', 'heic-head'));
$this->assertFalse($out['converted']);
$this->assertNotSame('', $out['bytes']);
@unlink($abs);
}
#[Test]
public function jpeg_passthrough_does_not_convert(): void
{