Commit 570df9d4 authored by Victor's avatar Victor

implement feedback

parent 734d5738
......@@ -439,7 +439,7 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte
public function sendFile($file, $status = 200, $headers = array(), $contentDisposition = null)
{
if (!class_exists('Symfony\Component\HttpFoundation\BinaryFileResponse')) {
throw new \RuntimeException('This feature is only supported as of Http Foundation 2.2.');
throw new \RuntimeException('The "senfFile" method is only supported as of Http Foundation 2.2.');
}
return new BinaryFileResponse($file, $status, $headers, true, $contentDisposition);
......
......@@ -493,7 +493,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
$app = new Application();
try {
$response = $app->sendFile(__FILE__, 200, array('Content-Type: application/php'), null);
$response = $app->sendFile(__FILE__, 200, array('Content-Type: application/php'));
$this->assertInstanceOf('Symfony\Component\HttpFoundation\BinaryFileResponse', $response);
$this->assertEquals(__FILE__, (string) $response->getFile());
} catch (\RuntimeException $e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment