You are here

public function FileTest::testGuessExtensionIsBasedOnMimeType in Zircon Profile 8.0

Same name and namespace in other branches
  1. 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

FileTest

Namespace

Symfony\Component\HttpFoundation\Tests\File

Code

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());
}