fix: link old

This commit is contained in:
hashbro
2026-09-14 02:18:56 +08:00
parent 4ae2bb14a6
commit f85aa3654a
2 changed files with 42 additions and 30 deletions
+12
View File
@@ -10,6 +10,18 @@ use Tests\TestCase;
class PhotoPreviewTest extends TestCase
{
#[Test]
public function basedir_probe_does_not_realpath_system_bins(): void
{
$preview = new PhotoPreview;
$ref = new \ReflectionMethod(PhotoPreview::class, 'isPathInsideOpenBasedir');
$this->assertFalse($ref->invoke($preview, '/usr/bin/heif-convert')
&& (string) ini_get('open_basedir') !== ''
&& ! str_contains((string) ini_get('open_basedir'), '/usr/bin'));
$resolved = (new \ReflectionMethod(PhotoPreview::class, 'resolveBinary'))->invoke($preview, 'heif-convert');
$this->assertNotNull($resolved);
}
#[Test]
public function detects_heic_ftyp_header(): void
{