Skip to content

Commit a44ac31

Browse files
committed
fix tests that invoke PHP and thus don't inherit run-tests.php INI settings
1 parent 47148c1 commit a44ac31

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Zend/tests/new_oom.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ $php = PHP_BINARY;
1313

1414
foreach (get_declared_classes() as $class) {
1515
$output = shell_exec("$php --no-php-ini $file $class 2>&1");
16-
if ($output && preg_match('(^\nFatal error: Allowed memory size of [0-9]+ bytes exhausted[^\r\n]* \(tried to allocate [0-9]+ bytes\) in [^\r\n]+ on line [0-9]+$)', $output) !== 1) {
16+
if ($output && preg_match('/^\nFatal error: Allowed memory size of [0-9]+ bytes exhausted[^\r\n]* \(tried to allocate [0-9]+ bytes\) in [^\r\n]+ on line [0-9]+\nStack trace:\n(#[0-9]+ [^\r\n]+\n)+$/', $output) !== 1) {
1717
echo "Class $class failed\n";
1818
echo $output, "\n";
1919
}

ext/opcache/tests/gh8846.phpt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ echo file_get_contents('http://' . PHP_CLI_SERVER_ADDRESS . '/gh8846-index.php?s
3434
bool(true)
3535
<br />
3636
<b>Fatal error</b>: Cannot redeclare class Foo (previously declared in %sgh8846-1.inc:2) in <b>%sgh8846-2.inc</b> on line <b>%d</b><br />
37+
Stack trace:
38+
#0 %sgh8846-index.php(%d): include()
39+
#1 {main}
3740

3841
bool(true)
3942
Ok

0 commit comments

Comments
 (0)