summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2016-02-16 08:05:16 +0100
committerAnatol Belski <ab@php.net>2016-02-16 08:05:16 +0100
commit974dea5e88c689320190dd91f5c51fc4dff07e49 (patch)
treee16f7e10a8dec237a21840bba90350dd1b128923
parent11102e26534d5a8ff91a50917cca00c51435ffb2 (diff)
downloadphp-git-974dea5e88c689320190dd91f5c51fc4dff07e49.tar.gz
improve test
-rw-r--r--ext/openssl/tests/openssl_csr_new_basic.phpt10
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/openssl/tests/openssl_csr_new_basic.phpt b/ext/openssl/tests/openssl_csr_new_basic.phpt
index a3a4746b39..e0f52d739f 100644
--- a/ext/openssl/tests/openssl_csr_new_basic.phpt
+++ b/ext/openssl/tests/openssl_csr_new_basic.phpt
@@ -9,16 +9,18 @@ $a = 1;
var_dump(openssl_csr_new(1,$a));
var_dump(openssl_csr_new(1,$a,1,1));
$a = array();
-var_dump(openssl_csr_new(array(), $a, array('config' => __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf'), array()));
+
+$conf = array('config' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'openssl.cnf');
+var_dump(openssl_csr_new(array(), $a, $conf, array()));
// this leaks
$a = array(1,2);
$b = array(1,2);
-var_dump(openssl_csr_new($a, $b, array('config' => __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf')));
+var_dump(openssl_csr_new($a, $b, $conf));
// options type check
-$x = openssl_pkey_new();
-var_dump(openssl_csr_new(["countryName" => "DE"], $x, ["x509_extensions" => 0xDEADBEEF]));
+$x = openssl_pkey_new($conf);
+var_dump(openssl_csr_new(["countryName" => "DE"], $x, $conf + ["x509_extensions" => 0xDEADBEEF]));
echo "Done\n";