mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing debug tests
This commit is contained in:
parent
5e635c74e2
commit
cee46f5ee3
1 changed files with 3 additions and 3 deletions
|
@ -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) . '.*<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);
|
||||||
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue