Skip to content

Commit

Permalink
Fix(docker): Fix tests for file-type checks on new docker alpine images
Browse files Browse the repository at this point in the history
  • Loading branch information
thePanz committed Mar 13, 2024
1 parent 89574d0 commit 1b00de4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/unit/validator/sfValidatorFileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 1b00de4

Please sign in to comment.