Fix tests when stdout is unbuffered (#13924)

This commit is contained in:
Arnaud Le Blanc 2024-04-16 13:49:11 +02:00 committed by GitHub
parent a64fc008c8
commit 326dc17bb4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 2 deletions

View File

@ -33,7 +33,13 @@ $p->setStub($stub);
unset($p);
include "php_cli_server.inc";
php_cli_server_start('-d opcache.enable=1 -d opcache.enable_cli=1 -d extension=phar.'.PHP_SHLIB_SUFFIX);
$ini = '-d opcache.enable=1 -d opcache.enable_cli=1';
if (file_exists(ini_get('extension_dir').'/phar.'.PHP_SHLIB_SUFFIX)) {
$ini .= ' -d extension=phar.'.PHP_SHLIB_SUFFIX;
}
php_cli_server_start($ini);
echo file_get_contents('http://' . PHP_CLI_SERVER_ADDRESS . '/issue0115_1.phar.php');
echo file_get_contents('http://' . PHP_CLI_SERVER_ADDRESS . '/issue0115_2.phar.php');
?>

View File

@ -21,7 +21,13 @@ $p->setStub($stub);
unset($p);
include "php_cli_server.inc";
php_cli_server_start('-d opcache.enable=1 -d opcache.enable_cli=1 -d extension=phar.'.PHP_SHLIB_SUFFIX);
$ini = '-d opcache.enable=1 -d opcache.enable_cli=1';
if (file_exists(ini_get('extension_dir').'/phar.'.PHP_SHLIB_SUFFIX)) {
$ini .= ' -d extension=phar.'.PHP_SHLIB_SUFFIX;
}
php_cli_server_start($ini);
echo file_get_contents('http://' . PHP_CLI_SERVER_ADDRESS . '/issue0149.phar.php');
echo file_get_contents('http://' . PHP_CLI_SERVER_ADDRESS . '/issue0149.phar.php');
echo file_get_contents('http://' . PHP_CLI_SERVER_ADDRESS . '/issue0149.phar.php');