'test.jpg.jar' => 'application/java-archive',
'test.pcf.z' => 'application/octet-stream',
'pcf.z' => 'application/octet-stream',
'jar' => 'application/octet-stream',
'some.junk' => 'application/octet-stream',
'foo.file_test_1' => 'application/octet-stream',
'foo.file_test_2' => 'application/octet-stream',
'foo.doc' => 'application/octet-stream',
'test.ogg' => 'application/octet-stream',
];
$extension_guesser =
$this->container->
get('file.mime_type.guesser.extension'
);
$extension_guesser->
setMapping($mapping);
foreach ($test_case as $input =>
$expected) { $output =
$extension_guesser->
guessMimeType($input);
$this->
assertSame($expected,
$output);
} }}