You are here

public function BinaryFileResponseTest::testAcceptRangeNotOverriden in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Tests/BinaryFileResponseTest.php \Symfony\Component\HttpFoundation\Tests\BinaryFileResponseTest::testAcceptRangeNotOverriden()

File

vendor/symfony/http-foundation/Tests/BinaryFileResponseTest.php, line 220

Class

BinaryFileResponseTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testAcceptRangeNotOverriden() {
  $request = Request::create('/', 'POST');
  $response = BinaryFileResponse::create(__DIR__ . '/File/Fixtures/test.gif', 200, array(
    'Content-Type' => 'application/octet-stream',
  ));
  $response->headers
    ->set('Accept-Ranges', 'foo');
  $response
    ->prepare($request);
  $this
    ->assertEquals('foo', $response->headers
    ->get('Accept-Ranges'));
}