Adding tests for file log path settings.

This commit is contained in:
mark_story 2009-11-05 19:44:50 -05:00
parent 01bb9e5957
commit 6c9f215306

View file

@ -63,5 +63,20 @@ class FileLogTest extends CakeTestCase {
unlink(LOGS . 'random.log');
}
/**
* test using the path setting to write logs in other places.
*
* @return void
**/
function testPathSetting() {
$path = TMP . 'tests' . DS;
@unlink($path . 'error.log');
$log =& new FileLog(compact('path'));
$log->write('warning', 'Test warning');
$this->assertTrue(file_exists($path . 'error.log'));
unlink($path . 'error.log');
}
}
?>