From f0d7e1be9ec24f4942425f6daba0be46fb642c80 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 27 Jun 2022 16:25:33 +0200 Subject: [PATCH] Increase test portability The test as is can only work if com_dotnet is built dynamically, and not already loaded via the php.ini file. While this is given on AppVeyor, it may not be given in other environments. --- ext/com_dotnet/tests/bug77578.phpt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ext/com_dotnet/tests/bug77578.phpt b/ext/com_dotnet/tests/bug77578.phpt index abb68cc163f4f..653a16123218d 100644 --- a/ext/com_dotnet/tests/bug77578.phpt +++ b/ext/com_dotnet/tests/bug77578.phpt @@ -7,9 +7,13 @@ com_dotnet // To actually be able to verify the crash during shutdown on Windows, we have // to execute a PHP subprocess, and check its exit status. $php = PHP_BINARY; -$ini = php_ini_loaded_file(); -$iniopt = $ini ? "-c $ini" : ''; -$command = "$php $iniopt -d extension=com_dotnet -d com.autoregister_typelib=1 -r \"new COM('WbemScripting.SWbemLocator');\""; +$extension_dir = ini_get("extension_dir"); +$script = <<