Skip to content

Commit

Permalink
new failing test
Browse files Browse the repository at this point in the history
Greg Beaver authored and Greg Beaver committed Jul 28, 2011

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 201ea99 commit 1e12ee3
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/Pyrus/JsonSchema/URI/uri_escapecomponent.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--TEST--
JsonSchema: URI - escapeComponent
--FILE--
<?php
require dirname(__FILE__) . '/setup.php.inc';
$input = "";
$output = "";
for ($d = 32; $d < 128; ++$d) {
$input .= chr($d);
if (preg_match("/[0-9A-Za-z\-\.\_\~\!\$\&\'\(\)\*\+\,\;\=]/", chr($d))) {
$output .= chr($d);
} else {
$output .= "%" . strtoupper(dechex($d));
}
}
$input .= urldecode("%C3%80%E3%82%A2");
$output .= "%C3%80%E3%82%A2";

$test->assertEquals($output, $uri->escapeComponent($input), 'test');
?>
===DONE===
--EXPECT--
===DONE===

0 comments on commit 1e12ee3

Please sign in to comment.