MDL-29749 phpunit: Windows dir uses backslashes
authorFrederic Massart <fred@moodle.com>
Tue, 22 Jan 2013 01:41:25 +0000 (09:41 +0800)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 22 Jan 2013 15:24:35 +0000 (16:24 +0100)
lib/tests/moodlelib_test.php

index dec5fdd..1c936d0 100644 (file)
@@ -875,7 +875,7 @@ class moodlelib_testcase extends advanced_testcase {
         $this->assertEquals(clean_param('../parentdirfile.txt', PARAM_FILE), '..parentdirfile.txt');
         $this->assertEquals(clean_param('../../grandparentdirfile.txt', PARAM_FILE), '....grandparentdirfile.txt');
         $this->assertEquals(clean_param('..\winparentdirfile.txt', PARAM_FILE), '..winparentdirfile.txt');
-        $this->assertEquals(clean_param('../../wingrandparentdir.txt', PARAM_FILE), '....wingrandparentdir.txt');
+        $this->assertEquals(clean_param('..\..\wingrandparentdir.txt', PARAM_FILE), '....wingrandparentdir.txt');
         $this->assertEquals(clean_param('myfile.a.b.txt', PARAM_FILE), 'myfile.a.b.txt');
         $this->assertEquals(clean_param('myfile..a..b.txt', PARAM_FILE), 'myfile..a..b.txt');
         $this->assertEquals(clean_param('myfile.a..b...txt', PARAM_FILE), 'myfile.a..b...txt');
@@ -906,7 +906,7 @@ class moodlelib_testcase extends advanced_testcase {
         $this->assertEquals(clean_param('../parentdirfile.txt', PARAM_PATH), '/parentdirfile.txt');
         $this->assertEquals(clean_param('../../grandparentdirfile.txt', PARAM_PATH), '/grandparentdirfile.txt');
         $this->assertEquals(clean_param('..\winparentdirfile.txt', PARAM_PATH), '/winparentdirfile.txt');
-        $this->assertEquals(clean_param('../../wingrandparentdir.txt', PARAM_PATH), '/wingrandparentdir.txt');
+        $this->assertEquals(clean_param('..\..\wingrandparentdir.txt', PARAM_PATH), '/wingrandparentdir.txt');
         $this->assertEquals(clean_param('funny:thing', PARAM_PATH), 'funnything');
         $this->assertEquals(clean_param('./././here', PARAM_PATH), './here');
         $this->assertEquals(clean_param('./currentdirfile.txt', PARAM_PATH), './currentdirfile.txt');