@@ -77,6 +77,32 @@ public function testRoutesCommand()
7777 $ this ->assertStringContainsString ($ expected , $ this ->getBuffer ());
7878 }
7979
80+ public function testRoutesCommandSortByHandler ()
81+ {
82+ $ this ->getCleanRoutes ();
83+
84+ command ('routes -h ' );
85+
86+ $ expected = <<<'EOL'
87+ +---------+---------+---------------+----------------------------------------+----------------+---------------+
88+ | Method | Route | Name | Handler ↓ | Before Filters | After Filters |
89+ +---------+---------+---------------+----------------------------------------+----------------+---------------+
90+ | GET | closure | » | (Closure) | | toolbar |
91+ | GET | / | » | \App\Controllers\Home::index | | toolbar |
92+ | GET | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
93+ | HEAD | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
94+ | POST | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
95+ | PUT | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
96+ | DELETE | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
97+ | OPTIONS | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
98+ | TRACE | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
99+ | CONNECT | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
100+ | CLI | testing | testing-index | \App\Controllers\TestController::index | | |
101+ +---------+---------+---------------+----------------------------------------+----------------+---------------+
102+ EOL;
103+ $ this ->assertStringContainsString ($ expected , $ this ->getBuffer ());
104+ }
105+
80106 public function testRoutesCommandAutoRouteImproved ()
81107 {
82108 $ routes = $ this ->getCleanRoutes ();
0 commit comments