Permalink
Browse files

Stripped timestamp from Log test comparison

Signed-off-by: dchill42 <dchill42@gmail.com>
  • Loading branch information...
1 parent b43ba1b commit 3fe00802dd127776988429d7329742e03d0c8acd @dchill42 committed Sep 25, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 tests/codeigniter/core/Log_test.php
@@ -44,7 +44,6 @@ public function test_write_log()
// Log debug message
$level = 'debug';
$msg = 'Testing debug output';
- $date = date($this->date_fmt);
$this->assertTrue($this->log->write_log($level, $msg));
// Was the file written?
@@ -57,8 +56,9 @@ public function test_write_log()
$log = ob_get_clean();
// Was the message written?
- $expect = "\n".strtoupper($level).' - '.$date.' --> '.$msg."\n";
- $this->assertEquals($expect, $log);
+ $expect = "\n".strtoupper($level).' - ##:##:## --> '.$msg."\n";
+ $cleaned = preg_replace('/\d/', '#', $log);
+ $this->assertEquals($expect, $cleaned);
// Does an info message get skipped?
$this->assertFalse($this->log->write_log('info', 'Do not write this'));

0 comments on commit 3fe0080

Please sign in to comment.