Skip to content

Commit

Permalink
RouterTest update
Browse files Browse the repository at this point in the history
  • Loading branch information
s3b4stian committed Sep 11, 2016
1 parent e4bdb0a commit 82c06ca
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/Http/RouterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

0 comments on commit 82c06ca

Please sign in to comment.