Skip to content
Snippets Groups Projects
Commit d301130e authored by Christopher Smith's avatar Christopher Smith
Browse files

additional auth_nameencode tests (apostrophe & backslash)

parent 5e40b274
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,18 @@ class auth_nameencode_test extends DokuWikiTest { ...@@ -19,6 +19,18 @@ class auth_nameencode_test extends DokuWikiTest {
$this->assertEquals(auth_nameencode($in),$out); $this->assertEquals(auth_nameencode($in),$out);
} }
function test_apostrophe(){
$in = 'hey\'you';
$out = 'hey%27you';
$this->assertEquals(auth_nameencode($in),$out);
}
function test_backslash(){
$in = 'hey\\you';
$out = 'hey%5cyou';
$this->assertEquals(auth_nameencode($in),$out);
}
function test_complex(){ function test_complex(){
$in = 'hey $ you !$%! foo '; $in = 'hey $ you !$%! foo ';
$out = 'hey%20%24%20you%20%21%24%25%21%20foo%20'; $out = 'hey%20%24%20you%20%21%24%25%21%20foo%20';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment