Merge pull request #1194 from dereuromark/2.4-file-improvements

Allow creating of missing tmp directories in debug (development) mode
This commit is contained in:
Mark Story 2013-08-07 09:52:07 -07:00
commit 054668f149
4 changed files with 23 additions and 8 deletions

View file

@ -373,20 +373,19 @@ class FileEngineTest extends CakeTestCase {
}
/**
* check that FileEngine generates an error when a configured Path does not exist.
* check that FileEngine does not generate an error when a configured Path does not exist in debug mode.
*
* @expectedException PHPUnit_Framework_Error_Warning
* @return void
*/
public function testErrorWhenPathDoesNotExist() {
$this->skipIf(is_dir(TMP . 'tests' . DS . 'file_failure'), 'Cannot run test directory exists.');
public function testPathDoesNotExist() {
$this->skipIf(is_dir(TMP . 'tests' . DS . 'autocreate'), 'Cannot run if test directory exists.');
Cache::config('failure', array(
Cache::config('autocreate', array(
'engine' => 'File',
'path' => TMP . 'tests' . DS . 'file_failure'
'path' => TMP . 'tests' . DS . 'autocreate'
));
Cache::drop('failure');
Cache::drop('autocreate');
}
/**