You are here

protected function FileTest::createMockGuesser in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Tests/File/FileTest.php \Symfony\Component\HttpFoundation\Tests\File\FileTest::createMockGuesser()
3 calls to FileTest::createMockGuesser()
FileTest::testGetMimeTypeUsesMimeTypeGuessers in vendor/symfony/http-foundation/Tests/File/FileTest.php
FileTest::testGuessExtensionIsBasedOnMimeType in vendor/symfony/http-foundation/Tests/File/FileTest.php
FileTest::testGuessExtensionWithReset in vendor/symfony/http-foundation/Tests/File/FileTest.php
@requires extension fileinfo

File

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

Class

FileTest

Namespace

Symfony\Component\HttpFoundation\Tests\File

Code

protected function createMockGuesser($path, $mimeType) {
  $guesser = $this
    ->getMock('Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesserInterface');
  $guesser
    ->expects($this
    ->once())
    ->method('guess')
    ->with($this
    ->equalTo($path))
    ->will($this
    ->returnValue($mimeType));
  return $guesser;
}