From fcffe3961f4594202dbd0816768fe900584ed8e2 Mon Sep 17 00:00:00 2001 From: Ceeram Date: Thu, 2 Oct 2014 22:12:35 +0200 Subject: [PATCH] Revert "add test to prove requesthandler works correct with Angular wonky accept headers" This reverts commit 8507ef83f175bbf3f6532dc68b6051f0d41acd82. Incorrect header was used for this test, Cake cannot safely determine correct header. To get CakePHP to respond with json, you can modify the angular common headers. --- .../Component/RequestHandlerComponentTest.php | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php index 340ac3894..3f330b60a 100644 --- a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php @@ -197,20 +197,6 @@ class RequestHandlerComponentTest extends CakeTestCase { $this->assertEquals('json', $this->RequestHandler->ext); } -/** - * Test that RequestHandler sets $this->ext when Angular sends its wonky-ish headers. - * - * @return void - */ - public function testInitializeContentTypeWithAngularAccept() { - $_SERVER['HTTP_ACCEPT'] = 'application/json, text/plain, * / *'; - $this->assertNull($this->RequestHandler->ext); - Router::parseExtensions('json'); - - $this->RequestHandler->initialize($this->Controller); - $this->assertEquals('json', $this->RequestHandler->ext); - } - /** * Test that RequestHandler sets $this->ext when jQuery sends its wonky-ish headers * and the application is configured to handle multiple extensions