Permalink
Browse files

Use simpler assertions.

  • Loading branch information...
1 parent 7a4cabe commit 3919f93149c0bfe07567c05b1163ee4a9074dc09 @markstory markstory committed Feb 16, 2014
Showing with 7 additions and 7 deletions.
  1. +7 −7 lib/Cake/Test/Case/Utility/DebuggerTest.php
@@ -455,18 +455,18 @@ public function testLog() {
Debugger::log('cool');
$result = file_get_contents(LOGS . 'debug.log');
- $this->assertRegExp('/DebuggerTest\:\:testLog/i', $result);
- $this->assertRegExp("/'cool'/", $result);
+ $this->assertContains('DebuggerTest::testLog', $result);
+ $this->assertContains("'cool'", $result);
unlink(LOGS . 'debug.log');
Debugger::log(array('whatever', 'here'));
$result = file_get_contents(LOGS . 'debug.log');
- $this->assertRegExp('/DebuggerTest\:\:testLog/i', $result);
- $this->assertRegExp('/\[main\]/', $result);
- $this->assertRegExp('/array/', $result);
- $this->assertRegExp("/'whatever',/", $result);
- $this->assertRegExp("/'here'/", $result);
+ $this->assertContains('DebuggerTest::testLog', $result);
+ $this->assertContains('[main]', $result);
+ $this->assertContains('array', $result);
+ $this->assertContains("'whatever',", $result);
+ $this->assertContains("'here'", $result);
}
/**

0 comments on commit 3919f93

Please sign in to comment.