public function ResponseHeaderBagTest::testReplace in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/http-foundation/Tests/ResponseHeaderBagTest.php \Symfony\Component\HttpFoundation\Tests\ResponseHeaderBagTest::testReplace()
File
- vendor/
symfony/ http-foundation/ Tests/ ResponseHeaderBagTest.php, line 145
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testReplace() {
$bag = new ResponseHeaderBag(array());
$this
->assertEquals('no-cache', $bag
->get('Cache-Control'));
$this
->assertTrue($bag
->hasCacheControlDirective('no-cache'));
$bag
->replace(array(
'Cache-Control' => 'public',
));
$this
->assertEquals('public', $bag
->get('Cache-Control'));
$this
->assertTrue($bag
->hasCacheControlDirective('public'));
}