Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding tests for file log path settings.

  • Loading branch information...
commit 6c9f215306632233d44cbcd020c53f28aa831180 1 parent 01bb9e5
@markstory markstory authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 cake/tests/cases/libs/log/file_log.test.php
View
15 cake/tests/cases/libs/log/file_log.test.php
@@ -63,5 +63,20 @@ function testLogFileWriting() {
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');
+ }
+
}
?>
Please sign in to comment.
Something went wrong with that request. Please try again.