diff --git a/ext/filter/tests/oom_filter_default_encoded.phpt b/ext/filter/tests/oom_filter_default_encoded.phpt index 4e81326639a0..c9a33090455b 100644 --- a/ext/filter/tests/oom_filter_default_encoded.phpt +++ b/ext/filter/tests/oom_filter_default_encoded.phpt @@ -26,6 +26,17 @@ function oom_post_encoded(string $body, string $script): void '-d', 'html_errors=0', '-d', 'filter.default=encoded', '-d', 'filter.default_flags=0', + ...((function () { + $extDir = ini_get("extension_dir"); + if (file_exists($extDir."/filter.so")) { + return [ + '-d', sprintf("extension_dir=%s", ini_get('extension_dir')), + '-d', 'extension=filter.so', + ]; + } else { + return []; + } + })()), /* the conversion is what is under test, not the deprecation */ '-d', 'error_reporting=' . (E_ALL & ~E_DEPRECATED), ], diff --git a/ext/filter/tests/oom_filter_input.phpt b/ext/filter/tests/oom_filter_input.phpt index aef71dff563c..6fc138bedec7 100644 --- a/ext/filter/tests/oom_filter_input.phpt +++ b/ext/filter/tests/oom_filter_input.phpt @@ -23,7 +23,22 @@ $body = "--$boundary\r\nContent-Disposition: form-data; name=\"k\"\r\n\r\n" . "\r\n--$boundary--\r\n"; $p = proc_open( - [getenv('TEST_PHP_CGI_EXECUTABLE'), '-n', '-d', 'memory_limit=12M', '-d', 'html_errors=0'], + [ + getenv('TEST_PHP_CGI_EXECUTABLE'), '-n', + '-d', 'memory_limit=12M', + '-d', 'html_errors=0', + ...((function () { + $extDir = ini_get("extension_dir"); + if (file_exists($extDir."/filter.so")) { + return [ + '-d', sprintf("extension_dir=%s", ini_get('extension_dir')), + '-d', 'extension=filter.so', + ]; + } else { + return []; + } + })()), + ], [0 => ['pipe', 'r'], 1 => ['pipe', 'w'], 2 => ['pipe', 'w']], $pipes, null, diff --git a/ext/filter/tests/oom_filter_input_array.phpt b/ext/filter/tests/oom_filter_input_array.phpt index a8e2712271c6..dfb82b84541d 100644 --- a/ext/filter/tests/oom_filter_input_array.phpt +++ b/ext/filter/tests/oom_filter_input_array.phpt @@ -23,7 +23,22 @@ $body = "--$boundary\r\nContent-Disposition: form-data; name=\"k\"\r\n\r\n" . "\r\n--$boundary--\r\n"; $p = proc_open( - [getenv('TEST_PHP_CGI_EXECUTABLE'), '-n', '-d', 'memory_limit=12M', '-d', 'html_errors=0'], + [ + getenv('TEST_PHP_CGI_EXECUTABLE'), '-n', + '-d', 'memory_limit=12M', + '-d', 'html_errors=0', + ...((function () { + $extDir = ini_get("extension_dir"); + if (file_exists($extDir."/filter.so")) { + return [ + '-d', sprintf("extension_dir=%s", ini_get('extension_dir')), + '-d', 'extension=filter.so', + ]; + } else { + return []; + } + })()), + ], [0 => ['pipe', 'r'], 1 => ['pipe', 'w'], 2 => ['pipe', 'w']], $pipes, null,