Fixing debug tests

This commit is contained in:
Jose Lorenzo Rodriguez 2011-05-15 00:22:39 -04:30
parent 5e635c74e2
commit cee46f5ee3

View file

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