mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-04 15:24:02 +01:00
46 lines
847 B
PHP
46 lines
847 B
PHP
<?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;'),
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Test for quote()
|
|
* @dataProvider data_quote
|
|
*/
|
|
function test_quote($str, $result)
|
|
{
|
|
$this->assertEquals(html::quote($str), $result);
|
|
}
|
|
}
|