From 1b00de433008b59034978454ad9993cc11b6fd3d Mon Sep 17 00:00:00 2001 From: thePanz Date: Wed, 13 Mar 2024 21:32:18 +0100 Subject: [PATCH] Fix(docker): Fix tests for file-type checks on new docker alpine images --- test/unit/validator/sfValidatorFileTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/validator/sfValidatorFileTest.php b/test/unit/validator/sfValidatorFileTest.php index ae34001cd..5c25ca7c7 100755 --- a/test/unit/validator/sfValidatorFileTest.php +++ b/test/unit/validator/sfValidatorFileTest.php @@ -94,7 +94,7 @@ public function getMimeTypesFromCategory($category) $v = new testValidatorFile(); $t->is($v->guessFromFileBinary($tmpDir.'/test.txt'), 'text/plain', '->guessFromFileBinary() guesses the type of a given file'); $t->is($v->guessFromFileBinary($tmpDir.'/foo.txt'), null, '->guessFromFileBinary() returns null if the file type is not guessable'); -$t->like($v->guessFromFileBinary('/bin/ls'), (PHP_OS != 'Darwin') ? '/^application\/x-(pie-executable|executable|sharedlib)$/' : '/^application/octet-stream$/', '->guessFromFileBinary() returns correct type if file is guessable'); +$t->is($v->guessFromFileBinary('/usr/bin/file'), 'application/x-pie-executable', '->guessFromFileBinary() returns correct type if file is guessable'); $t->is($v->guessFromFileBinary('-test'), null, '->guessFromFileBinary() returns null if file path has leading dash'); // ->getMimeType()