@@ -250,13 +250,16 @@ public function testAutoRouteFindsControllerWithSubfolder(): void
250
250
251
251
rmdir (APPPATH . 'Controllers/Subfolder ' );
252
252
253
+ $ this ->expectException (PageNotFoundException::class);
254
+
253
255
$ this ->assertSame ('MyController ' , $ router ->controllerName ());
254
256
$ this ->assertSame ('someMethod ' , $ router ->methodName ());
255
257
}
256
258
257
259
public function testAutoRouteFindsDashedSubfolder (): void
258
260
{
259
261
$ this ->collection ->setAutoRoute (true );
262
+
260
263
$ router = new Router ($ this ->collection , $ this ->request );
261
264
$ router ->setTranslateURIDashes (true );
262
265
@@ -266,6 +269,8 @@ public function testAutoRouteFindsDashedSubfolder(): void
266
269
267
270
rmdir (APPPATH . 'Controllers/Dash_folder ' );
268
271
272
+ $ this ->expectException (PageNotFoundException::class);
273
+
269
274
$ this ->assertSame ('Dash_folder/ ' , $ router ->directory ());
270
275
$ this ->assertSame ('Mycontroller ' , $ router ->controllerName ());
271
276
$ this ->assertSame ('somemethod ' , $ router ->methodName ());
@@ -329,6 +334,7 @@ public function testAutoRouteFindsDefaultDashFolder(): void
329
334
public function testAutoRouteFindsMByteDir (): void
330
335
{
331
336
$ this ->collection ->setAutoRoute (true );
337
+
332
338
$ router = new Router ($ this ->collection , $ this ->request );
333
339
$ router ->setTranslateURIDashes (true );
334
340
@@ -338,6 +344,8 @@ public function testAutoRouteFindsMByteDir(): void
338
344
339
345
rmdir (APPPATH . 'Controllers/Φ ' );
340
346
347
+ $ this ->expectException (PageNotFoundException::class);
348
+
341
349
$ this ->assertSame ('Φ/ ' , $ router ->directory ());
342
350
$ this ->assertSame ('Home ' , $ router ->controllerName ());
343
351
$ this ->assertSame ('index ' , $ router ->methodName ());
0 commit comments