Passed
Push — master ( 8d0a2c...a6fff0 )
by Dan
02:33
created
Tests/Router/RouteCollectionTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
     {
41 41
         $handler = 'my-handler';
42 42
         $routes = $this->collection;
43
-        $routes->group('/path', function () use ($routes, $handler) {
43
+        $routes->group('/path', function() use ($routes, $handler) {
44 44
             $routes->addRoute(['GET', 'POST'], '/foo', $handler, ['global']);
45
-            $routes->group('/sub-dir', function () use ($routes, $handler) {
45
+            $routes->group('/sub-dir', function() use ($routes, $handler) {
46 46
                 $routes->addRoute(['GET'], '/sub-page', $handler, ['sub-dir']);
47 47
             });
48 48
         });
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     public function testMergeCollection()
183 183
     {
184 184
         $handler = 'handler::string';
185
-        $names = ['routes','names'];
185
+        $names = ['routes', 'names'];
186 186
         $collection = new RouteCollection();
187 187
         $collection->addRoute('GET', '/path', $handler, $names);
188 188
         $collection->addRoute('GET', '/another', $handler, $names);
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
     {
202 202
         $this->setExpectedException(RouteException::class);
203 203
         $handler = 'handler::string';
204
-        $names = ['routes','names'];
204
+        $names = ['routes', 'names'];
205 205
         $collection = new RouteCollection();
206 206
         $collection->addRoute('GET', '/path', $handler, $names);
207 207
         $collection->addRoute('GET', '/another', $handler, $names);
@@ -252,11 +252,11 @@  discard block
 block discarded – undo
252 252
      */
253 253
     public function testMergeGroupNames()
254 254
     {
255
-        $expected = ['route-name','group-name'];
255
+        $expected = ['route-name', 'group-name'];
256 256
         $handler = 'myhandler';
257 257
         $routes = $this->collection;
258 258
 
259
-        $routes->group('/path', function () use ($routes, $handler) {
259
+        $routes->group('/path', function() use ($routes, $handler) {
260 260
             $routes->addRoute(['GET', 'POST'], '/foo', $handler, ['route-name']);
261 261
         }, ['group-name']);
262 262
 
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
     /**
268 268
      * Test that the namespace is matched to the handler and returned.
269 269
      */
270
-    public function testFindHandlerNamespace(){
270
+    public function testFindHandlerNamespace() {
271 271
 
272 272
         $routeCollection = new RouteCollection();
273 273
         $routeCollection->addNamespace('\Ds\Router');
@@ -279,13 +279,13 @@  discard block
 block discarded – undo
279 279
         $reflectionMethod->setAccessible(true);
280 280
         $actual = $reflectionMethod->invoke($routeCollection, $handler);
281 281
 
282
-        $this->assertEquals($expected,$actual);
282
+        $this->assertEquals($expected, $actual);
283 283
     }
284 284
 
285 285
     /**
286 286
      * Test that backlash is added to start of namespace on response.
287 287
      */
288
-    public function testFindHandlerNamespaceNoBacklash(){
288
+    public function testFindHandlerNamespaceNoBacklash() {
289 289
 
290 290
         $routeCollection = new RouteCollection();
291 291
         $routeCollection->addNamespace('Ds\Router');
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
         $reflectionMethod->setAccessible(true);
298 298
         $actual = $reflectionMethod->invoke($routeCollection, $handler);
299 299
 
300
-        $this->assertEquals($expected,$actual);
300
+        $this->assertEquals($expected, $actual);
301 301
     }
302 302
 
303 303
 }
Please login to merge, or discard this patch.