diff --git a/tests/Http/RouterTest.php b/tests/Http/RouterTest.php index 8e363138..228bbcc9 100644 --- a/tests/Http/RouterTest.php +++ b/tests/Http/RouterTest.php @@ -119,4 +119,24 @@ public function testParamRoute() $this->assertEquals('enable', $route->getAction()); $this->assertEquals(array('id'=>'5'), $route->getParam()); } + + public function testRewriteModeOff() + { + //start router + $router = new Router('/index.php?//user/5/enable', $this->routes, array( + 'basePath' => '/', + 'badRoute' => 'E404', + 'rewriteMode' => false + )); + + //get route + $route = $router->getRoute(); + + $this->assertInstanceOf(Route::class, $route); + $this->assertEquals('UserModel', $route->getModel()); + $this->assertEquals('UserView', $route->getView()); + $this->assertEquals('UserController', $route->getController()); + $this->assertEquals('enable', $route->getAction()); + $this->assertEquals(array('id'=>'5'), $route->getParam()); + } } \ No newline at end of file