Beispiel #1
0
 function rewrite($options = array())
 {
     list($params, $options) = $this->extractOptionsFromParameters($options);
     $this->rewriteParameters($params);
     $named_route = $this->extractNamedRoute($params);
     return (string) $this->Router->urlize($params, $named_route)->setOptions(array_merge($this->values_from_request, $options));
 }
Beispiel #2
0
 /**
  * @param string $url
  * @return PHPUnit_Routing_TestCase
  */
 public function get($url)
 {
     $Request = $this->createRequest($url);
     try {
         $this->params = $this->Router->match($Request);
         if ($this->reciprocity) {
             $this->assertEqual($url, $this->Router->urlize($this->params)->path());
         }
     } catch (NoMatchingRouteException $e) {
         $this->errors = true;
     }
     return $this;
 }