diff --git a/lib/Cake/Test/Case/Network/CakeRequestTest.php b/lib/Cake/Test/Case/Network/CakeRequestTest.php index 4ca06914c..aa1d22013 100644 --- a/lib/Cake/Test/Case/Network/CakeRequestTest.php +++ b/lib/Cake/Test/Case/Network/CakeRequestTest.php @@ -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 *