Skip to content
Permalink
Browse files

Fix failing tests and issue where / would be incorrectly handled.

  • Loading branch information...
markstory committed Jun 27, 2014
1 parent b55ccd5 commit 5e72b7536957157f21ebae89ee9c3424d7ba6e2a
@@ -18,7 +18,6 @@
use Cake\Core\Configure;
use Cake\Error;
use Cake\Network\Request;
use Cake\Routing\RouteCollection;
use Cake\Routing\ScopedRouteCollection;
use Cake\Routing\Route\Route;
use Cake\Utility\Inflector;
@@ -38,13 +37,6 @@
*/
class Router {
/**
* RouteCollection object containing all the connected routes.
*
* @var \Cake\Routing\RouteCollection
*/
protected static $_routes;
/**
* Have routes been loaded
*
@@ -485,7 +477,7 @@ public static function parse($url) {
if (!static::$initialized) {
static::_loadRoutes();
}
if (strlen($url) && strpos($url, '/') !== 0) {
if (strpos($url, '/') !== 0) {
$url = '/' . $url;
}
@@ -499,16 +491,6 @@ public static function parse($url) {
throw new Error\Exception('No routes match the given URL.');
}
/**
* Set the route collection object Router should use.
*
* @param \Cake\Routing\RouteCollection $routes Routes collection.
* @return void
*/
public static function setRouteCollection(RouteCollection $routes) {
static::$_routes = $routes;
}
/**
* Takes parameter and path information back from the Dispatcher, sets these
* parameters as the current request parameters that are merged with URL arrays
@@ -12,7 +12,7 @@
* @since 3.0.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
namespace Cake\Test\TestCase\Routing;
namespace Cake\Test\TestCase\Routing\Filter;
use Cake\Cache\Cache;
use Cake\Core\Configure;
@@ -81,7 +81,6 @@ public function testFullPageCachingDispatch($url) {
Configure::write('Cache.check', true);
Configure::write('debug', true);
Router::reload();
Router::connect('/', array('controller' => 'TestCachedPages', 'action' => 'index'));
Router::connect('/test_cached_pages/:action/*', ['controller' => 'TestCachedPages']);
@@ -12,7 +12,7 @@
* @since 3.0.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
namespace Cake\Test\TestCase\Routing;
namespace Cake\Test\TestCase\Routing\Filter;
use Cake\Event\Event;
use Cake\Network\Request;

0 comments on commit 5e72b75

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