/** * Ensures that the anchor is added after the query parameters. */ public function testAnchorIsAddedAfterQuery() { $this->url->withQuery('key', 'value'); $this->url->withAnchor('test'); $url = (string) $this->url; $this->assertGreaterThan(strpos($url, '?'), strpos($url, '#')); }
/** * Returns a url object that may be parametrized further and that * is automatically converted to a url string when it is printed. * * @param string $action * @param string $controller * @param string $module * @return Mol_View_Helper_Value_Url */ public function to($action, $controller, $module = 'default') { $url = new Mol_View_Helper_Value_Url($this->view); $url->withParam('action', $action); $url->withParam('controller', $controller); $url->withParam('module', $module); $url->withRoute('default'); return $url; }