Skip to content

Instantly share code, notes, and snippets.

@ringmaster
Created August 17, 2011 16:57
Show Gist options
  • Save ringmaster/1152011 to your computer and use it in GitHub Desktop.
Save ringmaster/1152011 to your computer and use it in GitHub Desktop.
/**
* Test matching routes that do not specify HTTP methods against specifically requested methods.
*/
public function testUnspecificMethodBasedMatching() {
$parameters = array('controller' => 'users', 'action' => 'edit');
$route = new Route(array(
'template' => '/nomethod',
'params' => $parameters ));
$this->assertEqual('/nomethod', $route->match($parameters));
$this->assertEqual('/nomethod', $route->match($parameters + array('http:method' => 'POST')));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment