Make unit tests pass under Windows

This commit is contained in:
Frederic Guillot
2015-10-22 21:31:30 -04:00
parent 5d15075223
commit 9707c0b4c4
7 changed files with 48 additions and 29 deletions

View File

@@ -84,9 +84,10 @@ class Template extends Helper
if (strpos($template_name, ':') !== false) {
list($plugin, $template) = explode(':', $template_name);
$path = __DIR__.'/../../plugins/'.ucfirst($plugin).'/Template/'.$template.'.php';
$path = __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'plugins';
$path .= DIRECTORY_SEPARATOR.ucfirst($plugin).DIRECTORY_SEPARATOR.'Template'.DIRECTORY_SEPARATOR.$template.'.php';
} else {
$path = __DIR__.'/../Template/'.$template_name.'.php';
$path = __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'Template'.DIRECTORY_SEPARATOR.$template_name.'.php';
}
return $path;