mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Adding return and test case for CakeLog::write()
This commit is contained in:
parent
f414378bc7
commit
c238d4d11b
2 changed files with 3 additions and 4 deletions
|
@ -12,7 +12,6 @@
|
|||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @filesource
|
||||
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
|
||||
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
|
||||
* @package cake
|
||||
|
@ -220,6 +219,7 @@ class CakeLog {
|
|||
$logger =& $self->_streams[$key];
|
||||
$logger->write($type, $message);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
/**
|
||||
* CakeLogTest file
|
||||
*
|
||||
* Long description for file
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
|
||||
|
@ -131,7 +129,8 @@ class CakeLogTest extends CakeTestCase {
|
|||
*/
|
||||
function testLogFileWriting() {
|
||||
@unlink(LOGS . 'error.log');
|
||||
CakeLog::write(LOG_WARNING, 'Test warning');
|
||||
$result = CakeLog::write(LOG_WARNING, 'Test warning');
|
||||
$this->assertTrue($result);
|
||||
$this->assertTrue(file_exists(LOGS . 'error.log'));
|
||||
unlink(LOGS . 'error.log');
|
||||
|
||||
|
|
Loading…
Reference in a new issue