Skip to content

Commit

Permalink
Adding return and test case for CakeLog::write()
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Nov 6, 2009
1 parent f414378 commit c238d4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cake/libs/cake_log.php
Expand Up @@ -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
Expand Down Expand Up @@ -220,6 +219,7 @@ function write($type, $message) {
$logger =& $self->_streams[$key];
$logger->write($type, $message);
}
return true;
}

/**
Expand Down
5 changes: 2 additions & 3 deletions cake/tests/cases/libs/cake_log.test.php
Expand Up @@ -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>
Expand Down Expand Up @@ -131,7 +129,8 @@ function testConfig() {
*/
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');

Expand Down

0 comments on commit c238d4d

Please sign in to comment.