public function testSetVary() {
$response = new Response();
$response
->setVary('Accept-Language');
$this
->assertEquals(array(
'Accept-Language',
), $response
->getVary());
$response
->setVary('Accept-Language, User-Agent');
$this
->assertEquals(array(
'Accept-Language',
'User-Agent',
), $response
->getVary(), '->setVary() replace the vary header by default');
$response
->setVary('X-Foo', false);
$this
->assertEquals(array(
'Accept-Language',
'User-Agent',
), $response
->getVary(), '->setVary() doesn\'t change the Vary header if replace is set to false');
}