Browse Source

add an extra final empty line to the shell output

antograssiot 10 years ago
parent
commit
ab3d362490
2 changed files with 6 additions and 1 deletions
  1. 5 0
      src/Shell/RoutesShell.php
  2. 1 1
      tests/TestCase/Shell/RoutesShellTest.php

+ 5 - 0
src/Shell/RoutesShell.php

@@ -42,6 +42,7 @@ class RoutesShell extends Shell
             $output[] = [$name, $route->template, json_encode($route->defaults)];
         }
         $this->helper('table')->output($output);
+        $this->out();
     }
 
     /**
@@ -65,8 +66,10 @@ class RoutesShell extends Shell
                 [$name, $url, json_encode($route)]
             ];
             $this->helper('table')->output($output);
+            $this->out();
         } catch (MissingRouteException $e) {
             $this->err("<warning>'$url' did not match any routes.</warning>");
+            $this->out();
             return false;
         }
     }
@@ -83,8 +86,10 @@ class RoutesShell extends Shell
             $args = $this->_splitArgs($this->args);
             $url = Router::url($args);
             $this->out("> $url");
+            $this->out();
         } catch (MissingRouteException $e) {
             $this->err("<warning>The provided parameters do not match any routes.</warning>");
+            $this->out();
             return false;
         }
     }

+ 1 - 1
tests/TestCase/Shell/RoutesShellTest.php

@@ -161,7 +161,7 @@ class RoutesShellTest extends TestCase
         $this->io->expects($this->at(0))
             ->method('out')
             ->with($this->stringContains('> /articles/index'));
-        $this->io->expects($this->at(1))
+        $this->io->expects($this->at(2))
             ->method('out')
             ->with($this->stringContains('> /articles/view/2/3'));