From a9ba3f60b008eb21f469cd4bdeb16009e6218945 Mon Sep 17 00:00:00 2001 From: saeid Date: Sun, 14 Aug 2016 01:33:32 +0430 Subject: [PATCH] CS & version --- src/Routing/Exception/DuplicateNamedRouteException.php | 2 +- src/Routing/RouteCollection.php | 2 +- tests/TestCase/Routing/RouteCollectionTest.php | 9 ++++----- tests/TestCase/Routing/RouterTest.php | 8 ++++---- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/Routing/Exception/DuplicateNamedRouteException.php b/src/Routing/Exception/DuplicateNamedRouteException.php index c22ecb156a5..80486f1d439 100644 --- a/src/Routing/Exception/DuplicateNamedRouteException.php +++ b/src/Routing/Exception/DuplicateNamedRouteException.php @@ -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; diff --git a/src/Routing/RouteCollection.php b/src/Routing/RouteCollection.php index 5e032e7ba8b..89726e777de 100644 --- a/src/Routing/RouteCollection.php +++ b/src/Routing/RouteCollection.php @@ -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; /** diff --git a/tests/TestCase/Routing/RouteCollectionTest.php b/tests/TestCase/Routing/RouteCollectionTest.php index 07b63e77907..5dbe2ddc12a 100644 --- a/tests/TestCase/Routing/RouteCollectionTest.php +++ b/tests/TestCase/Routing/RouteCollectionTest.php @@ -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']); } /** diff --git a/tests/TestCase/Routing/RouterTest.php b/tests/TestCase/Routing/RouterTest.php index 12396655243..75e626d5f4a 100644 --- a/tests/TestCase/Routing/RouterTest.php +++ b/tests/TestCase/Routing/RouterTest.php @@ -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'] @@ -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']