lithium\tests\cases\template\helper\HtmlTest::testLink PHP Method

    public function testLink()
    {
        $result = $this->html->link('/home');
        $expected = array('a' => array('href' => '/home'), 'regex:/\\/home/', '/a');
        $this->assertTags($result, $expected);
        $result = $this->html->link('Next >', '#');
        $expected = array('a' => array('href' => '#'), 'Next >', '/a');
        $this->assertTags($result, $expected);
        $result = $this->html->link('Next >', '#', array('escape' => true));
        $expected = array('a' => array('href' => '#'), 'Next >', '/a');
        $this->assertTags($result, $expected);
        $result = $this->html->link('Next >', '#', array('escape' => 'utf-8'));
        $expected = array('a' => array('href' => '#'), 'Next >', '/a');
        $this->assertTags($result, $expected);
        $result = $this->html->link('Next >', '#', array('escape' => false));
        $expected = array('a' => array('href' => '#'), 'Next >', '/a');
        $this->assertTags($result, $expected);
        $result = $this->html->link('Next >', '#', array('title' => 'to escape … or not escape?', 'escape' => false));
        $expected = array('a' => array('href' => '#', 'title' => 'to escape … or not escape?'), 'Next >', '/a');
        $this->assertTags($result, $expected);
        $result = $this->html->link('Next >', '#', array('title' => 'to escape … or not escape?', 'escape' => true));
        $expected = array('a' => array('href' => '#', 'title' => 'to escape … or not escape?'), 'Next >', '/a');
        $this->assertTags($result, $expected);
    }