$request->headers->
set('Accept-Encoding', 'gzip,deflate,sdch'
);
$this->
assertEquals(['gzip', 'deflate', 'sdch'
],
$request->
getEncodings());
$request =
new Request();
$request->headers->
set('Accept-Encoding', 'gzip;q=0.4,deflate;q=0.9,compress;q=0.7'
);
$this->
assertEquals(['deflate', 'compress', 'gzip'
],
$request->
getEncodings());
} public function testGetAcceptableContentTypes() { $request =
new Request();
$this->
assertEquals([],
$request->
getAcceptableContentTypes());
$request->headers->
set('Accept', 'application/vnd.wap.wmlscriptc, text/vnd.wap.wml, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/html, multipart/mixed, */*'
);
$this->
assertEquals([],
$request->
getAcceptableContentTypes()); // testing caching
$request =
new Request();
$request->headers->
set('Accept', 'application/vnd.wap.wmlscriptc, text/vnd.wap.wml, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/html, multipart/mixed, */*'
);
$this->
assertEquals(['application/vnd.wap.wmlscriptc', 'text/vnd.wap.wml', 'application/vnd.wap.xhtml+xml', 'application/xhtml+xml', 'text/html', 'multipart/mixed', '*/*'
],
$request->
getAcceptableContentTypes());
} public function testGetLanguages() { $request =
new Request();