diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2012-09-09 20:23:56 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2012-09-09 20:23:56 +0200 |
commit | 99d9f50a0000447d0a752e6c43716237dc0da176 (patch) | |
tree | 0b958b9711d09c4da74f076e1b902ffa32a4a0a1 /tests/Framework/Html.php | |
parent | a1303514933afe2d867067e4b95412c79652c89b (diff) | |
parent | 4e383e2ec8b4184c0fe74d02cf30fd3a4078128e (diff) |
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'tests/Framework/Html.php')
-rw-r--r-- | tests/Framework/Html.php | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/Framework/Html.php b/tests/Framework/Html.php new file mode 100644 index 000000000..8a27baca8 --- /dev/null +++ b/tests/Framework/Html.php @@ -0,0 +1,46 @@ +<?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('"', '"'), + array('<', '<'), + array('>', '>'), + array('&', '&'), + array('&', '&amp;'), + array('&', '&', true), + ); + } + + /** + * Test for quote() + * @dataProvider data_quote + */ + function test_quote($str, $result, $validate = false) + { + $this->assertEquals(html::quote($str, $validate), $result); + } +} |