]> granicus.if.org Git - php/commitdiff
add test
authorAnatol Belski <ab@php.net>
Wed, 23 Sep 2015 06:56:26 +0000 (08:56 +0200)
committerAnatol Belski <ab@php.net>
Wed, 23 Sep 2015 17:48:38 +0000 (19:48 +0200)
ext/openssl/tests/check_default_conf_path.phpt [new file with mode: 0644]

diff --git a/ext/openssl/tests/check_default_conf_path.phpt b/ext/openssl/tests/check_default_conf_path.phpt
new file mode 100644 (file)
index 0000000..16aaa4b
--- /dev/null
@@ -0,0 +1,24 @@
+--TEST--
+Check for default OpenSSL config path on Windows
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+    die('skip windows only test');
+}
+?>
+--FILE--
+<?php
+
+ob_start();
+phpinfo();
+$info = ob_get_contents();
+ob_end_clean();
+
+preg_match(",Openssl default config .* (.*),", $info, $m);
+
+if (isset($m[1])) {
+       var_dump(str_replace('/', '\\', strtolower($m[1])));
+}
+?>
+--EXPECT--
+string(28) "c:\usr\local\ssl\openssl.cnf"