Skip to content
Permalink
Browse files

Revert "add test to prove requesthandler works correct with Angular w…

…onky accept headers"

This reverts commit 8507ef8.

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.
  • Loading branch information...
ceeram committed Oct 2, 2014
1 parent e217736 commit fcffe3961f4594202dbd0816768fe900584ed8e2
Showing with 0 additions and 14 deletions.
  1. +0 −14 lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php
@@ -197,20 +197,6 @@ public function testInitializeContentTypeWithjQueryAccept() {
$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

0 comments on commit fcffe39

Please sign in to comment.
You can’t perform that action at this time.