summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Beaver <cellog@php.net>2008-06-10 19:23:09 +0000
committerGreg Beaver <cellog@php.net>2008-06-10 19:23:09 +0000
commit4a62db4e6c44ceddd4d43b7c235519898fba6f6f (patch)
tree963ddca3c53fbd757c69f9a18cba67c30f442543
parent8b8a64a3e80a386bcb27c3c3ebd963bce0451b80 (diff)
downloadphp-git-4a62db4e6c44ceddd4d43b7c235519898fba6f6f.tar.gz
new tests (forgot to add these earlier)
-rw-r--r--ext/phar/tests/phar_get_supported_signatures_001a.phpt25
-rw-r--r--ext/phar/tests/phar_get_supported_signatures_002a.phpt29
2 files changed, 54 insertions, 0 deletions
diff --git a/ext/phar/tests/phar_get_supported_signatures_001a.phpt b/ext/phar/tests/phar_get_supported_signatures_001a.phpt
new file mode 100644
index 0000000000..f267b48141
--- /dev/null
+++ b/ext/phar/tests/phar_get_supported_signatures_001a.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Phar::getSupportedSignatures()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (extension_loaded("hash")) die("skip extension hash conflicts"); ?>
+<?php if (!extension_loaded("openssl")) die("skip extension openssl loaded"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+var_dump(Phar::getSupportedSignatures());
+?>
+===DONE===
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ string(3) "MD5"
+ [1]=>
+ string(5) "SHA-1"
+ [2]=>
+ string(7) "OpenSSL"
+}
+===DONE===
diff --git a/ext/phar/tests/phar_get_supported_signatures_002a.phpt b/ext/phar/tests/phar_get_supported_signatures_002a.phpt
new file mode 100644
index 0000000000..ab2b0b0a98
--- /dev/null
+++ b/ext/phar/tests/phar_get_supported_signatures_002a.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Phar::getSupportedSignatures()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("hash")) die("skip extension hash required"); ?>
+<?php if (!extension_loaded("openssl")) die("skip extension openssl loaded"); ?>
+--INI--
+phar.require_hash=0
+phar.readonly=0
+--FILE--
+<?php
+var_dump(Phar::getSupportedSignatures());
+?>
+===DONE===
+?>
+--EXPECT--
+array(5) {
+ [0]=>
+ string(3) "MD5"
+ [1]=>
+ string(5) "SHA-1"
+ [2]=>
+ string(7) "SHA-256"
+ [3]=>
+ string(7) "SHA-512"
+ [4]=>
+ string(7) "OpenSSL"
+}
+===DONE===