Skip to content

Commit

Permalink
Update HandlerTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
usernane committed Jan 1, 2024
1 parent cb7cc83 commit f3fbbf4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/webfiori/tests/error/HandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ class HandlerTest extends TestCase {
*/
public function test00() {
$this->expectException(ErrorHandlerException::class);
$this->expectExceptionMessage('An exception caused by an error. Run-time warning: Undefined variable $y at HandlerTest Line 24');
if (PHP_MAJOR_VERSION == 7) {
$msg = 'Run-time notice: Undefined variable: y at HandlerTest Line 29';
} else {
$msg = 'An exception caused by an error. Run-time warning: Undefined variable $y at HandlerTest Line 29';
}
$this->expectExceptionMessage($msg);
$h = Handler::get();
$x = $y;
}
Expand Down

0 comments on commit f3fbbf4

Please sign in to comment.