summaryrefslogtreecommitdiff
path: root/tests/unit/Web/THttpUtilityTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/Web/THttpUtilityTest.php')
-rw-r--r--tests/unit/Web/THttpUtilityTest.php16
1 files 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('<tag key="value">');
+ self::assertEquals('&lt;tag key=&quot;value&quot;&gt;', $html);
+ $html = THttpUtility::htmlEncode('&lt;');
+ self::assertEquals('&lt;', $html);
+ }
- public function testHtmlDecode() {
- throw new PHPUnit_Framework_IncompleteTestError();
- }
+ public function testHtmlDecode() {
+ $html = THttpUtility::htmlDecode('&lt;tag key=&quot;value&quot;&gt;');
+ self::assertEquals('<tag key="value">', $html);
+ }
}
?> \ No newline at end of file