mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
parent
d80b1ef7f6
commit
f6b33db02c
1 changed files with 16 additions and 0 deletions
|
@ -929,6 +929,22 @@ class CakeRequestTest extends CakeTestCase {
|
|||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test parsing accept with a confusing accept value.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testParseAcceptNoQValues() {
|
||||
$_SERVER['HTTP_ACCEPT'] = 'application/json, text/plain, */*';
|
||||
|
||||
$request = new CakeRequest('/', false);
|
||||
$result = $request->parseAccept();
|
||||
$expected = array(
|
||||
'1.0' => array('application/json', 'text/plain', '*/*'),
|
||||
);
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* testBaseUrlAndWebrootWithModRewrite method
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue