summaryrefslogtreecommitdiff
path: root/tests/unit/Web/THttpUtilityTest.php
blob: 0f001ad8ce4314958b61a10412319c7169a38f26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php

use Prado\Web\THttpUtility;


/**
 * @package System.Web
 */
class THttpUtilityTest extends PHPUnit_Framework_TestCase {

	public function testHtmlEncode() {
		$html = THttpUtility::htmlEncode('<tag key="value">');
		self::assertEquals('&lt;tag key=&quot;value&quot;&gt;', $html);
		$html = THttpUtility::htmlEncode('&lt;');
		self::assertEquals('&lt;', $html);
	}

	public function testHtmlDecode() {
    	$html = THttpUtility::htmlDecode('&lt;tag key=&quot;value&quot;&gt;');
		self::assertEquals('<tag key="value">', $html);
	}
}