MDL-55379 phpunit: Remove directory seperator if present

This commit is contained in:
Rajesh Taneja 2016-09-22 12:56:48 +08:00
parent 791844d25a
commit 095883d1ea
No known key found for this signature in database
GPG Key ID: B363F7FB787F80E4

View File

@ -65,7 +65,8 @@ function testing_cli_argument_path($moodlepath) {
$path = testing_cli_fix_directory_separator($path);
if (strpos($path, $cwd) === 0) {
$path = substr($path, strlen($cwd));
// Remove current working directory and directory separator.
$path = substr($path, strlen($cwd)+1);
}
return $path;