1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 16:38:25 +02:00

new test to verify signature algo parsing works

This commit is contained in:
Greg Beaver
2007-11-25 05:24:50 +00:00
parent 38fc1fbc35
commit 48ca9c876c
+30
View File
@@ -0,0 +1,30 @@
--TEST--
verify signature parsing works
--SKIPIF--
<?php if (!extension_loaded("phar")) print "skip"; ?>
<?php if ( extension_loaded("hash")) print "skip extension hash conflicts"; ?>
--INI--
phar.require_hash=0
phar.readonly=0
--FILE--
<?php
$a = new Phar('sha1.phar');
$r = $a->getSignature();
var_dump($r['hash_type']);
$a = new Phar('sha512.phar');
$r = $a->getSignature();
var_dump($r['hash_type']);
$a = new Phar('sha256.phar');
$r = $a->getSignature();
var_dump($r['hash_type']);
$a = new Phar('md5.phar');
$r = $a->getSignature();
var_dump($r['hash_type']);
?>
===DONE===
--EXPECT--
string(5) "SHA-1"
string(7) "SHA-512"
string(7) "SHA-256"
string(3) "MD5"
===DONE===