You are here

public function ResponseHeaderBagTest::testReplaceWithRemove in Zircon Profile 8.0

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

File

vendor/symfony/http-foundation/Tests/ResponseHeaderBagTest.php, line 156

Class

ResponseHeaderBagTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testReplaceWithRemove() {
  $bag = new ResponseHeaderBag(array());
  $this
    ->assertEquals('no-cache', $bag
    ->get('Cache-Control'));
  $this
    ->assertTrue($bag
    ->hasCacheControlDirective('no-cache'));
  $bag
    ->remove('Cache-Control');
  $bag
    ->replace(array());
  $this
    ->assertEquals('no-cache', $bag
    ->get('Cache-Control'));
  $this
    ->assertTrue($bag
    ->hasCacheControlDirective('no-cache'));
}