summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>2013-07-05 15:02:41 +0300
committerVictor Dubiniuk <victor.dubiniuk@gmail.com>2013-07-09 17:46:11 +0300
commitc0b210f0d5b4953fc9a437d82ac6af1a4b482909 (patch)
treecf620bb7391e49b939523eca4df145d54e2afd02 /tests
parent257096f1d4f94bba08988aeca41f81865bdb8e23 (diff)
downloadnextcloud-server-c0b210f0d5b4953fc9a437d82ac6af1a4b482909.tar.gz
nextcloud-server-c0b210f0d5b4953fc9a437d82ac6af1a4b482909.zip
Add unit test
Diffstat (limited to 'tests')
-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));