Thomas Bruederli
2013-11-22 8d3a9d3213c34b9114762f748b48a71854eaa0bc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
 
/**
 * Test class to test rcube_html class
 *
 * @package Tests
 */
class Framework_Html extends PHPUnit_Framework_TestCase
{
 
    /**
     * Class constructor
     */
    function test_class()
    {
        $object = new html;
 
        $this->assertInstanceOf('html', $object, "Class constructor");
    }
 
    /**
     * Data for test_quote()
     */
    function data_quote()
    {
        return array(
            array('abc', 'abc'),
            array('?', '?'),
            array('"', '&quot;'),
            array('<', '&lt;'),
            array('>', '&gt;'),
            array('&', '&amp;'),
            array('&amp;', '&amp;amp;'),
        );
    }
 
    /**
     * Test for quote()
     * @dataProvider data_quote
     */
    function test_quote($str, $result)
    {
        $this->assertEquals(html::quote($str), $result);
    }
}