Make unit tests pass under Windows
This commit is contained in:
@@ -140,7 +140,7 @@ class FileStorage implements ObjectStorageInterface
|
||||
*/
|
||||
private function createFolder($key)
|
||||
{
|
||||
$folder = strpos($key, '/') !== false ? $this->path.DIRECTORY_SEPARATOR.dirname($key) : $this->path;
|
||||
$folder = strpos($key, DIRECTORY_SEPARATOR) !== false ? $this->path.DIRECTORY_SEPARATOR.dirname($key) : $this->path;
|
||||
|
||||
if (! is_dir($folder) && ! mkdir($folder, 0755, true)) {
|
||||
throw new ObjectStorageException('Unable to create folder: '.$folder);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user