From 8afa142d90de10cbd8bbd840c8eb32a3f5b846af Mon Sep 17 00:00:00 2001 From: knut <> Date: Tue, 29 May 2007 20:54:31 +0000 Subject: completed THttpUtilityTest --- tests/unit/Web/THttpUtilityTest.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/unit/Web/THttpUtilityTest.php b/tests/unit/Web/THttpUtilityTest.php index 4dfc46bd..b7181978 100644 --- a/tests/unit/Web/THttpUtilityTest.php +++ b/tests/unit/Web/THttpUtilityTest.php @@ -8,12 +8,16 @@ Prado::using('System.Web.THttpUtility'); */ class THttpUtilityTest extends PHPUnit_Framework_TestCase { - public function testHtmlEncode() { - throw new PHPUnit_Framework_IncompleteTestError(); - } + public function testHtmlEncode() { + $html = THttpUtility::htmlEncode(''); + self::assertEquals('<tag key="value">', $html); + $html = THttpUtility::htmlEncode('<'); + self::assertEquals('<', $html); + } - public function testHtmlDecode() { - throw new PHPUnit_Framework_IncompleteTestError(); - } + public function testHtmlDecode() { + $html = THttpUtility::htmlDecode('<tag key="value">'); + self::assertEquals('', $html); + } } ?> \ No newline at end of file -- cgit v1.2.3