Navigation Menu

Skip to content

Commit

Permalink
CS & version
Browse files Browse the repository at this point in the history
  • Loading branch information
saeideng authored and markstory committed Aug 19, 2016
1 parent ee96e83 commit a9ba3f6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/Routing/Exception/DuplicateNamedRouteException.php
Expand Up @@ -7,7 +7,7 @@
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @since 3.2.14
* @since 3.3.1
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
namespace Cake\Routing\Exception;
Expand Down
2 changes: 1 addition & 1 deletion src/Routing/RouteCollection.php
Expand Up @@ -14,8 +14,8 @@
*/
namespace Cake\Routing;

use Cake\Routing\Exception\MissingRouteException;
use Cake\Routing\Exception\DuplicateNamedRouteException;
use Cake\Routing\Exception\MissingRouteException;
use Cake\Routing\Route\Route;

/**
Expand Down
9 changes: 4 additions & 5 deletions tests/TestCase/Routing/RouteCollectionTest.php
Expand Up @@ -357,18 +357,17 @@ public function testAddingRoutes()

/**
* Test the add() with some _name.
*
*
* @expectedException \Cake\Routing\Exception\DuplicateNamedRouteException
*
*
* @return void
*/
public function testAddingDuplicateNamedRoutes()
{
$one = new Route('/pages/*', ['controller' => 'Pages', 'action' => 'display']);
$two = new Route('/', ['controller' => 'Dashboards', 'action' => 'display']);
$this->collection->add($one,['_name' => 'test']);
$this->collection->add($two,['_name' => 'test']);

$this->collection->add($one, ['_name' => 'test']);
$this->collection->add($two, ['_name' => 'test']);
}

/**
Expand Down
8 changes: 4 additions & 4 deletions tests/TestCase/Routing/RouterTest.php
Expand Up @@ -1204,12 +1204,12 @@ public function testDuplicateNamedRouteException()
['controller' => 'users', 'action' => 'view'],
['_name' => 'test']
);
Router::connect(
Router::connect(
'/users/:name',
['controller' => 'users', 'action' => 'view'],
['_name' => 'otherName']
);
Router::connect(
Router::connect(
'/users/:name',
['controller' => 'users', 'action' => 'view'],
['_name' => 'test']
Expand All @@ -1228,12 +1228,12 @@ public function testNoDuplicateNamedRouteException()
['controller' => 'users', 'action' => 'view'],
['_name' => 'test']
);
Router::connect(
Router::connect(
'/users/:name',
['controller' => 'users', 'action' => 'view'],
['_name' => 'test2']
);
Router::connect(
Router::connect(
'/users/:name',
['controller' => 'users', 'action' => 'view'],
['_name' => 'test3']
Expand Down

0 comments on commit a9ba3f6

Please sign in to comment.