mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
code style in FileLog and FileLogTest
This commit is contained in:
parent
278700677a
commit
5b5180f661
2 changed files with 5 additions and 4 deletions
|
@ -150,6 +150,7 @@ class FileLog extends BaseLog {
|
|||
array($pathname, $this->_config['mask'])), E_USER_WARNING);
|
||||
$selfError = false;
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue