1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Add test for bug #78106

Also add PHP_TEST_EXTRA_ARGS environment variable, which allows
to pass on -c, -d etc flags provided by run-tests.php. Otherwise
we won't get the built-in server to run with opcache.
This commit is contained in:
Nikita Popov
2019-06-13 12:35:29 +02:00
parent feb92adc5c
commit f8a68fd935
5 changed files with 39 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
--TEST--
Bug #78106: PHP Fatal error: Uncaught Error: Class 'Phpfastcache\Config\Config' not found
--XFAIL--
Not fixed yet
--FILE--
<?php
include __DIR__ . "/php_cli_server.inc";
php_cli_server_start(getenv('TEST_PHP_EXTRA_ARGS'));
echo file_get_contents("http://" . PHP_CLI_SERVER_ADDRESS . "/bug78106_test1.php" );
echo file_get_contents("http://" . PHP_CLI_SERVER_ADDRESS . "/bug78106_test2.php" );
echo file_get_contents("http://" . PHP_CLI_SERVER_ADDRESS . "/bug78106_test1.php" );
?>
--EXPECT--
included
done
included
done
included
done

View File

@@ -0,0 +1,3 @@
<?php
echo "included\n";

View File

@@ -0,0 +1,6 @@
<?php
ini_set('opcache.enable', 0);
require_once 'bug78106_include.inc';
echo "done\n";

View File

@@ -0,0 +1,5 @@
<?php
require_once 'bug78106_include.inc';
echo "done\n";

View File

@@ -820,7 +820,7 @@ HELP;
if (substr(PHP_OS, 0, 3) == "WIN") {
$pass_options .= " -c " . escapeshellarg($conf_passed);
} else {
$pass_options .= " -c '$conf_passed'";
$pass_options .= " -c '" . realpath($conf_passed) . "'";
}
}
@@ -1611,6 +1611,8 @@ TEST $file
settings2params($ini_settings);
$env['TEST_PHP_EXTRA_ARGS'] = $pass_options . ' ' . $ini_settings;
// Check if test should be skipped.
$info = '';
$warn = false;