diff --git a/tests/require-missing-php5.phpt b/tests/require-missing-php5.phpt index 0050579..1d8327c 100644 --- a/tests/require-missing-php5.phpt +++ b/tests/require-missing-php5.phpt @@ -1,12 +1,12 @@ --TEST-- -Include and require of nonexistent files +Include and require of nonexistent files (PHP < 8.0) --SKIPIF-- =")) { + echo "skip PHP 7 version of the test on PHP 8+"; } --FILE-- = 8.6) + +--SKIPIF-- + +===DONE=== + +--EXPECTF-- +Including missing file... + +Warning: fopen('%s', 'r', true): Failed to open stream: No such file or directory in %s%esrc%eCodeManipulation%eStream.php on line %d + +Warning: include('%s'): Failed to open stream: "Patchwork\CodeManipulation\Stream::stream_open" call failed in %s on line 9 + +Warning: include('%s'): Failed opening '%s/includes/does-not-exist.php' for inclusion (include_path='%s') in %s on line 9 +Good, it did not throw/exit. + +Requiring missing file... + +Warning: fopen('%s', 'r', true): Failed to open stream: No such file or directory in %s%esrc%eCodeManipulation%eStream.php on line %d + +Warning: require('%s'): Failed to open stream: "Patchwork\CodeManipulation\Stream::stream_open" call failed in %s on line 13 + +Fatal error: Uncaught Error: Failed opening required '%s/includes/does-not-exist.php' (include_path='%s') in %s:13 +Stack trace: +#0 {main} + thrown in %s on line 13 diff --git a/tests/require-missing.phpt b/tests/require-missing.phpt index 89f8b0d..1278e32 100644 --- a/tests/require-missing.phpt +++ b/tests/require-missing.phpt @@ -1,12 +1,15 @@ --TEST-- -Include and require of nonexistent files +Include and require of nonexistent files (PHP 8.0-8.5) --SKIPIF-- =")) { - echo "skip PHP 8+ version of the test in PHP <8"; +if (version_compare(PHP_VERSION_ID, "80000", "<")) { + echo "skip PHP 8.0-8.5 version of the test on PHP <8"; +} +if (version_compare(PHP_VERSION_ID, "80600", ">=")) { + echo "skip PHP 8.0-8.5 version of the test on PHP >=8.6"; } --FILE--