protected function FileTest::createMockGuesser

2 calls to FileTest::createMockGuesser()
FileTest::testGetMimeTypeUsesMimeTypeGuessers in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/FileTest.php
FileTest::testGuessExtensionIsBasedOnMimeType in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/FileTest.php

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/FileTest.php, line 157

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