Skip to content
This repository
Browse code

text/javascript is not the correct mime for js

  • Loading branch information...
commit 2967a4db233594c2e47b333678e19301f636a68f 1 parent 790a53d
Andy Dawson authored July 06, 2012
8  lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php
@@ -178,7 +178,7 @@ public function testInitializeContentTypeSettingExt() {
178 178
  * @return void
179 179
  */
180 180
 	public function testInitializeContentTypeWithjQueryAccept() {
181  
-		$_SERVER['HTTP_ACCEPT'] = 'application/json, text/javascript, */*; q=0.01';
  181
+		$_SERVER['HTTP_ACCEPT'] = 'application/json, application/javascript, */*; q=0.01';
182 182
 		$this->assertNull($this->RequestHandler->ext);
183 183
 		Router::parseExtensions('json');
184 184
 
@@ -193,7 +193,7 @@ public function testInitializeContentTypeWithjQueryAccept() {
193 193
  * @return void
194 194
  */
195 195
 	public function testInitializeContentTypeWithjQueryAcceptAndMultiplesExtensions() {
196  
-		$_SERVER['HTTP_ACCEPT'] = 'application/json, text/javascript, */*; q=0.01';
  196
+		$_SERVER['HTTP_ACCEPT'] = 'application/json, application/javascript, */*; q=0.01';
197 197
 		$this->assertNull($this->RequestHandler->ext);
198 198
 		Router::parseExtensions('rss', 'json');
199 199
 
@@ -221,7 +221,7 @@ public function testInitializeNoContentTypeWithSingleAccept() {
221 221
  * @return void
222 222
  */
223 223
 	public function testInitializeNoContentTypeWithMultipleAcceptedTypes() {
224  
-		$_SERVER['HTTP_ACCEPT'] = 'application/json, text/javascript, application/xml, */*; q=0.01';
  224
+		$_SERVER['HTTP_ACCEPT'] = 'application/json, application/javascript, application/xml, */*; q=0.01';
225 225
 		$this->assertNull($this->RequestHandler->ext);
226 226
 		Router::parseExtensions('xml', 'json');
227 227
 
@@ -630,7 +630,7 @@ public function testMapAlias() {
630 630
 		$this->assertEquals('text/vnd.wap.wml', $result);
631 631
 
632 632
 		$result = $this->RequestHandler->mapAlias(array('xml', 'js', 'json'));
633  
-		$expected = array('application/xml', 'text/javascript', 'application/json');
  633
+		$expected = array('application/xml', 'application/javascript', 'application/json');
634 634
 		$this->assertEquals($expected, $result);
635 635
 	}
636 636
 

0 notes on commit 2967a4d

Please sign in to comment.
Something went wrong with that request. Please try again.