public function FileTest::testGuessExtensionIsBasedOnMimeType in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/http-foundation/Tests/File/FileTest.php \Symfony\Component\HttpFoundation\Tests\File\FileTest::testGuessExtensionIsBasedOnMimeType()
File
- vendor/
symfony/ http-foundation/ Tests/ File/ FileTest.php, line 38
Class
Namespace
Symfony\Component\HttpFoundation\Tests\FileCode
public function testGuessExtensionIsBasedOnMimeType() {
$file = new File(__DIR__ . '/Fixtures/test');
$guesser = $this
->createMockGuesser($file
->getPathname(), 'image/gif');
MimeTypeGuesser::getInstance()
->register($guesser);
$this
->assertEquals('gif', $file
->guessExtension());
}