code style in FileLog and FileLogTest

This commit is contained in:
Rémi Dewitte 2013-03-08 09:32:46 +01:00
parent 278700677a
commit 5b5180f661
2 changed files with 5 additions and 4 deletions

View file

@ -150,6 +150,7 @@ class FileLog extends BaseLog {
array($pathname, $this->_config['mask'])), E_USER_WARNING);
$selfError = false;
}
return $r;
}
/**

View file

@ -158,21 +158,21 @@ class FileLogTest extends CakeTestCase {
$log = new FileLog(array('path' => $path, 'mask' => 0666));
$log->write('warning', 'Test warning one');
$result = substr(sprintf('%o',fileperms($path . 'error.log')), -4);
$result = substr(sprintf('%o', fileperms($path . 'error.log')), -4);
$expected = '0666';
$this->assertEquals($expected, $result);
unlink($path . 'error.log');
$log = new FileLog(array('path' => $path, 'mask' => 0644));
$log->write('warning', 'Test warning two');
$result = substr(sprintf('%o',fileperms($path . 'error.log')), -4);
$result = substr(sprintf('%o', fileperms($path . 'error.log')), -4);
$expected = '0644';
$this->assertEquals($expected, $result);
unlink($path . 'error.log');
$log = new FileLog(array('path' => $path, 'mask' => 0640));
$log->write('warning', 'Test warning three');
$result = substr(sprintf('%o',fileperms($path . 'error.log')), -4);
$result = substr(sprintf('%o', fileperms($path . 'error.log')), -4);
$expected = '0640';
$this->assertEquals($expected, $result);
unlink($path . 'error.log');