Skip to content

Commit 48ca9c8

Browse files
author
Greg Beaver
committed
new test to verify signature algo parsing works
1 parent 38fc1fb commit 48ca9c8

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
--TEST--
2+
verify signature parsing works
3+
--SKIPIF--
4+
<?php if (!extension_loaded("phar")) print "skip"; ?>
5+
<?php if ( extension_loaded("hash")) print "skip extension hash conflicts"; ?>
6+
--INI--
7+
phar.require_hash=0
8+
phar.readonly=0
9+
--FILE--
10+
<?php
11+
$a = new Phar('sha1.phar');
12+
$r = $a->getSignature();
13+
var_dump($r['hash_type']);
14+
$a = new Phar('sha512.phar');
15+
$r = $a->getSignature();
16+
var_dump($r['hash_type']);
17+
$a = new Phar('sha256.phar');
18+
$r = $a->getSignature();
19+
var_dump($r['hash_type']);
20+
$a = new Phar('md5.phar');
21+
$r = $a->getSignature();
22+
var_dump($r['hash_type']);
23+
?>
24+
===DONE===
25+
--EXPECT--
26+
string(5) "SHA-1"
27+
string(7) "SHA-512"
28+
string(7) "SHA-256"
29+
string(3) "MD5"
30+
===DONE===

0 commit comments

Comments
 (0)