Skip to content

Commit f3aadcc

Browse files
committed
test: fix some test case errors.
1 parent a1f2c50 commit f3aadcc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/system/Router/RouterTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,16 @@ public function testAutoRouteFindsControllerWithSubfolder(): void
250250

251251
rmdir(APPPATH . 'Controllers/Subfolder');
252252

253+
$this->expectException(PageNotFoundException::class);
254+
253255
$this->assertSame('MyController', $router->controllerName());
254256
$this->assertSame('someMethod', $router->methodName());
255257
}
256258

257259
public function testAutoRouteFindsDashedSubfolder(): void
258260
{
259261
$this->collection->setAutoRoute(true);
262+
260263
$router = new Router($this->collection, $this->request);
261264
$router->setTranslateURIDashes(true);
262265

@@ -266,6 +269,8 @@ public function testAutoRouteFindsDashedSubfolder(): void
266269

267270
rmdir(APPPATH . 'Controllers/Dash_folder');
268271

272+
$this->expectException(PageNotFoundException::class);
273+
269274
$this->assertSame('Dash_folder/', $router->directory());
270275
$this->assertSame('Mycontroller', $router->controllerName());
271276
$this->assertSame('somemethod', $router->methodName());
@@ -329,6 +334,7 @@ public function testAutoRouteFindsDefaultDashFolder(): void
329334
public function testAutoRouteFindsMByteDir(): void
330335
{
331336
$this->collection->setAutoRoute(true);
337+
332338
$router = new Router($this->collection, $this->request);
333339
$router->setTranslateURIDashes(true);
334340

@@ -338,6 +344,8 @@ public function testAutoRouteFindsMByteDir(): void
338344

339345
rmdir(APPPATH . 'Controllers/Φ');
340346

347+
$this->expectException(PageNotFoundException::class);
348+
341349
$this->assertSame('Φ/', $router->directory());
342350
$this->assertSame('Home', $router->controllerName());
343351
$this->assertSame('index', $router->methodName());

0 commit comments

Comments
 (0)