Aleksander Machniak
2012-08-27 5f8097b9eba09302be561d67ce035275494043e3
tests/Framework/Html.php
@@ -17,4 +17,30 @@
        $this->assertInstanceOf('html', $object, "Class constructor");
    }
    /**
     * Data for test_quote()
     */
    function data_quote()
    {
        return array(
            array('abc', 'abc'),
            array('?', '?'),
            array('"', '"'),
            array('<', '&lt;'),
            array('>', '&gt;'),
            array('&', '&amp;'),
            array('&amp;', '&amp;amp;'),
            array('&amp;', '&amp;', true),
        );
    }
    /**
     * Test for quote()
     * @dataProvider data_quote
     */
    function test_quote($str, $result, $validate = false)
    {
        $this->assertEquals(html::quote($str, $validate), $result);
    }
}