blob: b7181978745256d9d5113003beba93001c975e8d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<?php
require_once dirname(__FILE__).'/../phpunit.php';
Prado::using('System.Web.THttpUtility');
/**
* @package System.Web
*/
class THttpUtilityTest extends PHPUnit_Framework_TestCase {
public function testHtmlEncode() {
$html = THttpUtility::htmlEncode('<tag key="value">');
self::assertEquals('<tag key="value">', $html);
$html = THttpUtility::htmlEncode('<');
self::assertEquals('<', $html);
}
public function testHtmlDecode() {
$html = THttpUtility::htmlDecode('<tag key="value">');
self::assertEquals('<tag key="value">', $html);
}
}
?>
|