You are here

public function FileTest::testGetMimeTypeUsesMimeTypeGuessers 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::testGetMimeTypeUsesMimeTypeGuessers()

File

vendor/symfony/http-foundation/Tests/File/FileTest.php, line 21

Class

FileTest

Namespace

Symfony\Component\HttpFoundation\Tests\File

Code

public function testGetMimeTypeUsesMimeTypeGuessers() {
  $file = new File(__DIR__ . '/Fixtures/test.gif');
  $guesser = $this
    ->createMockGuesser($file
    ->getPathname(), 'image/gif');
  MimeTypeGuesser::getInstance()
    ->register($guesser);
  $this
    ->assertEquals('image/gif', $file
    ->getMimeType());
}