Permalink
Browse files

Create the correct file structure in the systems tmp directory

  • Loading branch information...
Blaine Schmeisser
Blaine Schmeisser committed Dec 14, 2012
1 parent 62b8b7a commit dff45133a989b3f05b05d0b5aff941d2d80f96f0
Showing with 13 additions and 1 deletion.
  1. +7 −1 console/lithium.php
  2. +6 −0 tests/cases/console/RequestTest.php
View
@@ -34,11 +34,17 @@
throw new ErrorException($message);
}
+ $resources = sys_get_temp_dir();
+ $templates = $resources . '/tmp/cache/templates/';
+ if (!is_dir($templates)) {
+ mkdir($resources . '/tmp/cache/templates/', 0777, true);
+ }
+
lithium\core\Libraries::add('lithium');
lithium\core\Libraries::add(basename($working), array(
'default' => true,
'path' => $working,
- 'resources' => sys_get_temp_dir()
+ 'resources' => $resources
));
};
@@ -175,6 +175,12 @@ public function testShiftTwo() {
$result = $request->params;
$this->assertEqual($expected, $result);
}
+
+ public function testTemporaryFileStructureExists() {
+ $resources = Libraries::get(true, 'resources');
+ $template = $resources . '/tmp/cache/templates/';
+ $this->assert(is_dir($template));
+ }
}
?>

0 comments on commit dff4513

Please sign in to comment.