lithium\tests\cases\template\HelperTest::testAttributeEscaping PHP Method

testAttributeEscaping() public method

    public function testAttributeEscaping()
    {
        $attributes = array('checked' => true, 'title' => '<foo>');
        $expected = ' checked="checked" title="&lt;foo&gt;"';
        $result = $this->helper->testAttributes($attributes);
        $this->assertEqual($expected, $result);
        $attributes = array('checked' => true, 'title' => '<foo>');
        $expected = ' checked="checked" title="<foo>"';
        $result = $this->helper->testAttributes($attributes, null, array('escape' => false));
        $this->assertEqual($expected, $result);
    }