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