You are here

public function HttpCacheTest::testPassesHeadRequestsThroughDirectlyOnPass in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php \Symfony\Component\HttpKernel\Tests\HttpCache\HttpCacheTest::testPassesHeadRequestsThroughDirectlyOnPass()

File

vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php, line 849

Class

HttpCacheTest

Namespace

Symfony\Component\HttpKernel\Tests\HttpCache

Code

public function testPassesHeadRequestsThroughDirectlyOnPass() {
  $that = $this;
  $this
    ->setNextResponse(200, array(), 'Hello World', function ($request, $response) use ($that) {
    $response
      ->setContent('');
    $response
      ->setStatusCode(200);
    $that
      ->assertEquals('HEAD', $request
      ->getMethod());
  });
  $this
    ->request('HEAD', '/', array(
    'HTTP_EXPECT' => 'something ...',
  ));
  $this
    ->assertHttpKernelIsCalled();
  $this
    ->assertEquals('', $this->response
    ->getContent());
}