summaryrefslogtreecommitdiff
path: root/tests/unit/Web/THttpUtilityTest.php
diff options
context:
space:
mode:
authorknut <>2007-05-29 20:54:31 +0000
committerknut <>2007-05-29 20:54:31 +0000
commit8afa142d90de10cbd8bbd840c8eb32a3f5b846af (patch)
tree6523bdd0ab74bac674fdd172ec7287978beba427 /tests/unit/Web/THttpUtilityTest.php
parentf3931ef17118868d89103b54549345c5cb0f86bb (diff)
completed THttpUtilityTest
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