mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
test: Update DebuggerTest for PHP 8.0+
This commit is contained in:
parent
1d6fd78d45
commit
d47407353b
1 changed files with 5 additions and 5 deletions
|
@ -203,10 +203,10 @@ class DebuggerTest extends CakeTestCase {
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
'error' => array(),
|
'error' => array(),
|
||||||
'code' => array(), '8', '/code',
|
'code' => array(), '2', '/code',
|
||||||
'file' => array(), 'preg:/[^<]+/', '/file',
|
'file' => array(), 'preg:/[^<]+/', '/file',
|
||||||
'line' => array(), '' . ((int)__LINE__ - 7), '/line',
|
'line' => array(), '' . ((int)__LINE__ - 7), '/line',
|
||||||
'preg:/Undefined variable:\s+foo/',
|
'preg:/Undefined variable\s+\$foo/',
|
||||||
'/error'
|
'/error'
|
||||||
);
|
);
|
||||||
$this->assertTags($result, $data, true);
|
$this->assertTags($result, $data, true);
|
||||||
|
@ -262,10 +262,10 @@ class DebuggerTest extends CakeTestCase {
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
'<error',
|
'<error',
|
||||||
'<code', '8', '/code',
|
'<code', '2', '/code',
|
||||||
'<file', 'preg:/[^<]+/', '/file',
|
'<file', 'preg:/[^<]+/', '/file',
|
||||||
'<line', '' . ((int)__LINE__ - 7), '/line',
|
'<line', '' . ((int)__LINE__ - 7), '/line',
|
||||||
'preg:/Undefined variable:\s+foo/',
|
'preg:/Undefined variable\s+\$foo/',
|
||||||
'/error'
|
'/error'
|
||||||
);
|
);
|
||||||
$this->assertTags($result, $data, true);
|
$this->assertTags($result, $data, true);
|
||||||
|
@ -286,7 +286,7 @@ class DebuggerTest extends CakeTestCase {
|
||||||
ob_start();
|
ob_start();
|
||||||
$foo .= '';
|
$foo .= '';
|
||||||
$result = ob_get_clean();
|
$result = ob_get_clean();
|
||||||
$this->assertStringContainsString('Notice: I eated an error', $result);
|
$this->assertStringContainsString('Warning: I eated an error', $result);
|
||||||
$this->assertStringContainsString('DebuggerTest.php', $result);
|
$this->assertStringContainsString('DebuggerTest.php', $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue