$headers =
[ 'fOo' => 'BAR',
'ETag' => 'xyzzy',
'Content-MD5' => 'Q2hlY2sgSW50ZWdyaXR5IQ==',
'P3P' => 'CP="CAO PSA OUR"',
'WWW-Authenticate' => 'Basic realm="WallyWorld"',
'X-UA-Compatible' => 'IE=edge,chrome=1',
'X-XSS-Protection' => '1; mode=block',
];
$bag =
new ResponseHeaderBag($headers);
$allPreservedCase =
$bag->
allPreserveCase();
foreach (array_keys($headers) as $headerName) { $this->
assertArrayHasKey($headerName,
$allPreservedCase, '->allPreserveCase() gets all input keys in original case'
);
} } public function testCacheControlHeader() { $bag =
new ResponseHeaderBag([]);
$this->
assertEquals('no-cache, private',
$bag->
get('Cache-Control'
));