mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-14 19:08:25 +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(
|
||||
'error' => array(),
|
||||
'code' => array(), '8', '/code',
|
||||
'code' => array(), '2', '/code',
|
||||
'file' => array(), 'preg:/[^<]+/', '/file',
|
||||
'line' => array(), '' . ((int)__LINE__ - 7), '/line',
|
||||
'preg:/Undefined variable:\s+foo/',
|
||||
'preg:/Undefined variable\s+\$foo/',
|
||||
'/error'
|
||||
);
|
||||
$this->assertTags($result, $data, true);
|
||||
|
@ -262,10 +262,10 @@ class DebuggerTest extends CakeTestCase {
|
|||
|
||||
$data = array(
|
||||
'<error',
|
||||
'<code', '8', '/code',
|
||||
'<code', '2', '/code',
|
||||
'<file', 'preg:/[^<]+/', '/file',
|
||||
'<line', '' . ((int)__LINE__ - 7), '/line',
|
||||
'preg:/Undefined variable:\s+foo/',
|
||||
'preg:/Undefined variable\s+\$foo/',
|
||||
'/error'
|
||||
);
|
||||
$this->assertTags($result, $data, true);
|
||||
|
@ -286,7 +286,7 @@ class DebuggerTest extends CakeTestCase {
|
|||
ob_start();
|
||||
$foo .= '';
|
||||
$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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue