Example #1
0
 /**
  * @return string
  */
 public function render()
 {
     $href = Helper::url($this->controller, $this->action, $this->data);
     $element = new UrlElement($this->title, $href, $this->cssClass);
     return $element->render();
 }
 /**
  * @dataProvider urlDataProvider
  * @param string $controller
  * @param string $action
  * @param array  $data
  * @param string $expected
  */
 public function testUrl($controller, $action, $data, $expected)
 {
     Settings::setConfig(new Store(['base_url' => 'http://foo.local/']));
     $this->assertEquals($expected, Helper::url($controller, $action, $data));
 }