Browse Source

Remove a bunch of dead code.

This code is basically garbage and does nothing.
mark_story 11 years ago
parent
commit
0e009ab613

+ 5 - 5
tests/TestCase/Controller/Component/RequestHandlerComponentTest.php

@@ -70,7 +70,11 @@ class RequestHandlerComponentTest extends TestCase {
 		$this->Controller = new RequestHandlerTestController($request, $response);
 		$this->Controller->constructClasses();
 		$this->RequestHandler = new RequestHandlerComponent($this->Controller->components());
-		$this->_extensions = Router::extensions();
+
+		Router::scope('/', function($routes) {
+			$routes->extensions('json');
+			$routes->fallbacks();
+		});
 	}
 
 /**
@@ -83,10 +87,6 @@ class RequestHandlerComponentTest extends TestCase {
 		DispatcherFactory::clear();
 		$this->_init();
 		unset($this->RequestHandler, $this->Controller);
-		if (!headers_sent()) {
-			header('Content-type: text/html'); //reset content type.
-		}
-		call_user_func_array('Cake\Routing\Router::parseExtensions', [$this->_extensions, false]);
 	}
 
 /**