Skip to content

Instantly share code, notes, and snippets.

@marcghorayeb
Created July 23, 2013 12:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcghorayeb/6061882 to your computer and use it in GitHub Desktop.
Save marcghorayeb/6061882 to your computer and use it in GitHub Desktop.
Li3 RFC concerning Route parsing.
/**
*
*/
public function testRouteMatchWithControllerParsed() {
Router::reset();
Router::connect('/{:controller:lists}/{:action:add}');
$this->assertIdentical(
'/lists/add',
Router::match(array('controller' => 'lists', 'action' => 'add'))
);
Router::connect('/lists/{:action:add}', array('controller' => 'lists'));
$this->assertIdentical(
'/lists/add',
Router::match(array('controller' => 'lists', 'action' => 'add'))
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment