@@ -198,46 +198,28 @@ public function testRoutesCommandRouteLegacy(): void
198
198
$ routes ->loadRoutes ();
199
199
200
200
$ routes ->setAutoRoute (true );
201
- $ namespace = 'Tests\Support\Controllers ' ;
202
- $ routes ->setDefaultNamespace ($ namespace );
203
201
204
202
command ('routes ' );
205
203
206
204
$ expected = <<<'EOL'
207
- +---------+-------------------------------+---------------+-----------------------------------------------------+----------------+---------------+
208
- | Method | Route | Name | Handler | Before Filters | After Filters |
209
- +---------+-------------------------------+---------------+-----------------------------------------------------+----------------+---------------+
210
- | GET | / | » | \App\Controllers\Home::index | | toolbar |
211
- | GET | closure | » | (Closure) | | toolbar |
212
- | GET | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
213
- | HEAD | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
214
- | POST | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
215
- | PUT | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
216
- | DELETE | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
217
- | OPTIONS | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
218
- | TRACE | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
219
- | CONNECT | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
220
- | CLI | testing | testing-index | \App\Controllers\TestController::index | | |
221
- | auto | hello | | \Tests\Support\Controllers\Hello::index | | toolbar |
222
- | auto | hello/index[/...] | | \Tests\Support\Controllers\Hello::index | | toolbar |
223
- | auto | newautorouting/getIndex[/...] | | \Tests\Support\Controllers\Newautorouting::getIndex | | toolbar |
224
- | auto | newautorouting/postSave[/...] | | \Tests\Support\Controllers\Newautorouting::postSave | | toolbar |
225
- | auto | popcorn | | \Tests\Support\Controllers\Popcorn::index | | toolbar |
226
- | auto | popcorn/index[/...] | | \Tests\Support\Controllers\Popcorn::index | | toolbar |
227
- | auto | popcorn/pop[/...] | | \Tests\Support\Controllers\Popcorn::pop | | toolbar |
228
- | auto | popcorn/popper[/...] | | \Tests\Support\Controllers\Popcorn::popper | | toolbar |
229
- | auto | popcorn/weasel[/...] | | \Tests\Support\Controllers\Popcorn::weasel | | toolbar |
230
- | auto | popcorn/oops[/...] | | \Tests\Support\Controllers\Popcorn::oops | | toolbar |
231
- | auto | popcorn/goaway[/...] | | \Tests\Support\Controllers\Popcorn::goaway | | toolbar |
232
- | auto | popcorn/index3[/...] | | \Tests\Support\Controllers\Popcorn::index3 | | toolbar |
233
- | auto | popcorn/canyon[/...] | | \Tests\Support\Controllers\Popcorn::canyon | | toolbar |
234
- | auto | popcorn/cat[/...] | | \Tests\Support\Controllers\Popcorn::cat | | toolbar |
235
- | auto | popcorn/json[/...] | | \Tests\Support\Controllers\Popcorn::json | | toolbar |
236
- | auto | popcorn/xml[/...] | | \Tests\Support\Controllers\Popcorn::xml | | toolbar |
237
- | auto | popcorn/toindex[/...] | | \Tests\Support\Controllers\Popcorn::toindex | | toolbar |
238
- | auto | popcorn/echoJson[/...] | | \Tests\Support\Controllers\Popcorn::echoJson | | toolbar |
239
- | auto | remap[/...] | | \Tests\Support\Controllers\Remap::_remap | | toolbar |
240
- +---------+-------------------------------+---------------+-----------------------------------------------------+----------------+---------------+
205
+ +---------+------------------+---------------+----------------------------------------+----------------+---------------+
206
+ | Method | Route | Name | Handler | Before Filters | After Filters |
207
+ +---------+------------------+---------------+----------------------------------------+----------------+---------------+
208
+ | GET | / | » | \App\Controllers\Home::index | | toolbar |
209
+ | GET | closure | » | (Closure) | | toolbar |
210
+ | GET | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
211
+ | HEAD | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
212
+ | POST | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
213
+ | PUT | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
214
+ | DELETE | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
215
+ | OPTIONS | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
216
+ | TRACE | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
217
+ | CONNECT | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
218
+ | CLI | testing | testing-index | \App\Controllers\TestController::index | | |
219
+ | auto | / | | \App\Controllers\Home::index | | toolbar |
220
+ | auto | home | | \App\Controllers\Home::index | | toolbar |
221
+ | auto | home/index[/...] | | \App\Controllers\Home::index | | toolbar |
222
+ +---------+------------------+---------------+----------------------------------------+----------------+---------------+
241
223
EOL;
242
224
$ this ->assertStringContainsString ($ expected , $ this ->getBuffer ());
243
225
}
0 commit comments