Skip to content

Commit

Permalink
Updating other debugger tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Oct 20, 2011
1 parent 49f687b commit 986b7d3
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions lib/Cake/Test/Case/Utility/DebuggerTest.php
Expand Up @@ -347,7 +347,7 @@ public function testLog() {
Debugger::log('cool');
$result = file_get_contents(LOGS . 'debug.log');
$this->assertPattern('/DebuggerTest\:\:testLog/i', $result);
$this->assertPattern('/"cool"/', $result);
$this->assertPattern("/'cool'/", $result);

unlink(TMP . 'logs' . DS . 'debug.log');

Expand All @@ -356,8 +356,8 @@ public function testLog() {
$this->assertPattern('/DebuggerTest\:\:testLog/i', $result);
$this->assertPattern('/\[main\]/', $result);
$this->assertPattern('/array/', $result);
$this->assertPattern('/"whatever",/', $result);
$this->assertPattern('/"here"/', $result);
$this->assertPattern("/'whatever',/", $result);
$this->assertPattern("/'here'/", $result);
}

/**
Expand All @@ -381,7 +381,18 @@ public function testDump() {
ob_start();
Debugger::dump($var);
$result = ob_get_clean();
$expected = "<pre>array(\n\t'People' => array()\n)</pre>";
$expected = <<<TEXT
<pre>array(
'People' => array(
(int) 0 => array(
),
(int) 1 => array(
)
)
)</pre>
TEXT;
$result = str_replace(array("\r\n", "\n"), "", $result);
$expected = str_replace(array("\r\n", "\n"), "", $expected);
$this->assertEquals($expected, $result);
}

Expand Down

0 comments on commit 986b7d3

Please sign in to comment.