summaryrefslogtreecommitdiffstats
path: root/tests/lib/util.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/util.php')
-rw-r--r--tests/lib/util.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/lib/util.php b/tests/lib/util.php
index 1f253825920..9742d57ac7a 100644
--- a/tests/lib/util.php
+++ b/tests/lib/util.php
@@ -37,6 +37,12 @@ class Test_Util extends PHPUnit_Framework_TestCase {
$result = OC_Util::sanitizeHTML($goodString);
$this->assertEquals("This is an harmless string.", $result);
}
+
+ function testEncodePath(){
+ $component = '/§#@test%&^ä/-child';
+ $result = OC_Util::encodePath($component);
+ $this->assertEquals("/%C2%A7%23%40test%25%26%5E%C3%A4/-child", $result);
+ }
function testGenerate_random_bytes() {
$result = strlen(OC_Util::generate_random_bytes(59));