Example #1
0
 /**
  * Router::urlFor should throw an exception if Route with name
  * does not exist.
  */
 public function testUrlForNamedRouteThatDoesNotExist()
 {
     $this->setExpectedException('RuntimeException');
     $request = new Request();
     $router = new Router($request);
     $route = $router->map('/foo/bar', function () {
     }, 'GET');
     $router->cacheNamedRoute('bar', $route);
     $router->urlFor('foo');
 }