summaryrefslogtreecommitdiff
path: root/_test/tests/inc/auth_nameencode.test.php
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2013-10-19 14:35:22 +0100
committerChristopher Smith <chris@jalakai.co.uk>2013-10-19 14:35:22 +0100
commitd301130ed39d5dad319c60cdb3879c6751611831 (patch)
tree0b48ceb93ec9ed85be6ea15a5c892f967ce427a1 /_test/tests/inc/auth_nameencode.test.php
parent5e40b274af54284ae63341c87534fbbc1e1cea44 (diff)
downloadrpg-d301130ed39d5dad319c60cdb3879c6751611831.tar.gz
rpg-d301130ed39d5dad319c60cdb3879c6751611831.tar.bz2
additional auth_nameencode tests (apostrophe & backslash)
Diffstat (limited to '_test/tests/inc/auth_nameencode.test.php')
-rw-r--r--_test/tests/inc/auth_nameencode.test.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/_test/tests/inc/auth_nameencode.test.php b/_test/tests/inc/auth_nameencode.test.php
index da9f31f90..074155486 100644
--- a/_test/tests/inc/auth_nameencode.test.php
+++ b/_test/tests/inc/auth_nameencode.test.php
@@ -19,6 +19,18 @@ class auth_nameencode_test extends DokuWikiTest {
$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(){
$in = 'hey $ you !$%! foo ';
$out = 'hey%20%24%20you%20%21%24%25%21%20foo%20';