Adding return and test case for CakeLog::write()

This commit is contained in:
mark_story 2009-11-05 23:20:40 -05:00
parent f414378bc7
commit c238d4d11b
2 changed files with 3 additions and 4 deletions

View file

@ -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;
}
/**

View file

@ -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');