mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-12 06:56:24 +00:00
Adding tests for file log path settings.
This commit is contained in:
parent
01bb9e5957
commit
6c9f215306
1 changed files with 15 additions and 0 deletions
|
@ -63,5 +63,20 @@ class FileLogTest extends CakeTestCase {
|
||||||
unlink(LOGS . 'random.log');
|
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');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
Loading…
Add table
Reference in a new issue