file() public method

public file ( $file, $fileName = null, $disposition = ResponseHeaderBag::DISPOSITION_ATTACHMENT )
Esempio n. 1
0
 /**
  * @expectedException \Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException
  */
 public function testFileWhichDoesNotExist()
 {
     $controller = new TestController();
     /* @var BinaryFileResponse $response */
     $response = $controller->file('some-file.txt', 'test.php');
 }