]> granicus.if.org Git - php/commitdiff
new tests (forgot to add these earlier)
authorGreg Beaver <cellog@php.net>
Tue, 10 Jun 2008 19:23:09 +0000 (19:23 +0000)
committerGreg Beaver <cellog@php.net>
Tue, 10 Jun 2008 19:23:09 +0000 (19:23 +0000)
ext/phar/tests/phar_get_supported_signatures_001a.phpt [new file with mode: 0644]
ext/phar/tests/phar_get_supported_signatures_002a.phpt [new file with mode: 0644]

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 (file)
index 0000000..f267b48
--- /dev/null
@@ -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 (file)
index 0000000..ab2b0b0
--- /dev/null
@@ -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===