$this->
assertEquals('1.0',
$response->
getProtocolVersion());
$response->
setProtocolVersion('1.1'
);
$this->
assertEquals('1.1',
$response->
getProtocolVersion());
} public function testGetVary() { $response =
new Response();
$this->
assertEquals([],
$response->
getVary(), '->getVary() returns an empty array if no Vary header is present'
);
$response =
new Response();
$response->headers->
set('Vary', 'Accept-Language'
);
$this->
assertEquals(['Accept-Language'
],
$response->
getVary(), '->getVary() parses a single header name value'
);
$response =
new Response();
$response->headers->
set('Vary', 'Accept-Language User-Agent X-Foo'
);
$this->
assertEquals(['Accept-Language', 'User-Agent', 'X-Foo'
],
$response->
getVary(), '->getVary() parses multiple header name values separated by spaces'
);
$response =
new Response();
$response->headers->
set('Vary', 'Accept-Language,User-Agent, X-Foo'
);