Skip to content

Commit

Permalink
split test into two due to different outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
ashnazg committed Mar 22, 2021
1 parent b7a6f37 commit 0d02417
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
18 changes: 18 additions & 0 deletions tests/PEAR_RunTest/bug10286-old.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
--TEST--
PEAR_RunTest Bug #10286 - no output from fatal errors displayed.
--SKIPIF--
<?php
if (version_compare(PHP_VERSION, '8.0.0') >= 0) {
echo 'skip';
}
?>
--FILE--
<?php
$oops->method();
// PHP5: Fatal error:
// PHP7: Catchable fatal error:
?>
--EXPECTF--
Notice: Undefined variable: oops in %sbug10286-old.php on line %d

%satal error:%sCall to a member function method() on %s in %sbug10286-old.php on line %d
13 changes: 11 additions & 2 deletions tests/PEAR_RunTest/bug10286.phpt
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
--TEST--
PEAR_RunTest Bug #10286 - no output from fatal errors displayed.
--SKIPIF--
<?php
if (version_compare(PHP_VERSION, '8.0.0') == -1) {
echo 'skip';
}
?>
--FILE--
<?php
$oops->method();
// PHP5: Fatal error:
// PHP7: Catchable fatal error:
?>
--EXPECTF--
Notice: Undefined variable: oops in %sbug10286.php on line %d
Warning: Undefined variable $oops in %s/bug10286.php on line %d

%satal error:%sCall to a member function method() on %s in %sbug10286.php on line %d
Fatal error: Uncaught Error: Call to a member function method() on null in %s/bug10286.php:%d
Stack trace:
#0 {main}
thrown in %s/bug10286.php on line %d

0 comments on commit 0d02417

Please sign in to comment.