fix: link old

This commit is contained in:
hashbro
2026-09-14 02:11:09 +08:00
parent d5ae0bf6ff
commit a360a7bc94
3 changed files with 59 additions and 8 deletions
+15
View File
@@ -20,6 +20,21 @@ class PhotoPreviewTest extends TestCase
$this->assertFalse($preview->headLooksHeic(''));
}
#[Test]
public function heic_convert_process_throw_does_not_bubble(): void
{
Storage::fake('local');
Process::fake(function () {
throw new \RuntimeException('proc_open is disabled');
});
$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', 'throw'));
$this->assertFalse($out['converted']);
$this->assertNotSame('', $out['bytes']);
@unlink($abs);
}
#[Test]
public function heic_without_throwing_when_system_bins_are_outside_basedir(): void
{