Skip to content

Commit

Permalink
Fixing debug tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed May 15, 2011
1 parent 5e635c7 commit cee46f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Cake/Test/Case/BasicsTest.php
Expand Up @@ -678,23 +678,23 @@ public function testDebug() {
ob_start();
debug('this-is-a-test');
$result = ob_get_clean();
$pattern = '/(.+?tests(\/|\\\)Case(\/|\\\)BasicsTest\.php|';
$pattern = '/(.+?Test(\/|\\\)Case(\/|\\\)BasicsTest\.php|';
$pattern .= preg_quote(substr(__FILE__, 1), '/') . ')';
$pattern .= '.*line.*' . (__LINE__ - 4) . '.*this-is-a-test.*/s';
$this->assertPattern($pattern, $result);

ob_start();
debug('<div>this-is-a-test</div>', true);
$result = ob_get_clean();
$pattern = '/(.+?tests(\/|\\\)Case(\/|\\\)BasicsTest\.php|';
$pattern = '/(.+?Test(\/|\\\)Case(\/|\\\)BasicsTest\.php|';
$pattern .= preg_quote(substr(__FILE__, 1), '/') . ')';
$pattern .= '.*line.*' . (__LINE__ - 4) . '.*&lt;div&gt;this-is-a-test&lt;\/div&gt;.*/s';
$this->assertPattern($pattern, $result);

ob_start();
debug('<div>this-is-a-test</div>', false);
$result = ob_get_clean();
$pattern = '/(.+?tests(\/|\\\)Case(\/|\\\)BasicsTest\.php|';
$pattern = '/(.+?Test(\/|\\\)Case(\/|\\\)BasicsTest\.php|';
$pattern .= preg_quote(substr(__FILE__, 1), '/') . ')';
$pattern .= '.*line.*' . (__LINE__ - 4) . '.*\<div\>this-is-a-test\<\/div\>.*/s';
$this->assertPattern($pattern, $result);
Expand Down

0 comments on commit cee46f5

Please sign in to comment.