diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-10-22 21:31:30 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-10-22 21:31:30 -0400 |
commit | 9707c0b4c4145b9fbdab3a2ecb40c92633dacab1 (patch) | |
tree | 126918a559d09d5e1bda51f5baf520e399c3c10f /app/Core | |
parent | 5d1507522366e51be79813fd5a0c80e96001a964 (diff) |
Make unit tests pass under Windows
Diffstat (limited to 'app/Core')
-rw-r--r-- | app/Core/ObjectStorage/FileStorage.php | 2 | ||||
-rw-r--r-- | app/Core/Template.php | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/app/Core/ObjectStorage/FileStorage.php b/app/Core/ObjectStorage/FileStorage.php index 683a9e7f..dd049ca2 100644 --- a/app/Core/ObjectStorage/FileStorage.php +++ b/app/Core/ObjectStorage/FileStorage.php @@ -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); diff --git a/app/Core/Template.php b/app/Core/Template.php index 002b20b1..ce2884a7 100644 --- a/app/Core/Template.php +++ b/app/Core/Template.php @@ -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; |