mirror of
https://github.com/php/php-src.git
synced 2026-03-26 01:02:25 +01:00
Merge branch 'PHP-7.4'
* PHP-7.4: Fix phar tests with hash extension Fix missing file and remove SKIP section
This commit is contained in:
@@ -29,11 +29,9 @@ unlink(__DIR__ . '/buildfromiterator10.phar');
|
||||
__HALT_COMPILER();
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(35) {
|
||||
array(34) {
|
||||
["phar_ctx_001.phpt"]=>
|
||||
string(%d) "%sphar_ctx_001.phpt"
|
||||
["phar_get_supported_signatures_001.phpt"]=>
|
||||
string(%d) "%sphar_get_supported_signatures_001.phpt"
|
||||
["phar_get_supported_signatures_002.phpt"]=>
|
||||
string(%d) "%sphar_get_supported_signatures_002.phpt"
|
||||
["phar_oo_001.phpt"]=>
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
--TEST--
|
||||
Phar::getSupportedSignatures()
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("phar")) die("skip");
|
||||
if (extension_loaded("hash")) die("skip extension hash conflicts");
|
||||
$arr = Phar::getSupportedSignatures();
|
||||
if (in_array("OpenSSL", $arr)) die("skip openssl support enabled");
|
||||
?>
|
||||
--INI--
|
||||
phar.require_hash=0
|
||||
phar.readonly=0
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(Phar::getSupportedSignatures());
|
||||
?>
|
||||
===DONE===
|
||||
?>
|
||||
--EXPECT--
|
||||
array(2) {
|
||||
[0]=>
|
||||
string(3) "MD5"
|
||||
[1]=>
|
||||
string(5) "SHA-1"
|
||||
}
|
||||
===DONE===
|
||||
@@ -1,28 +0,0 @@
|
||||
--TEST--
|
||||
Phar::getSupportedSignatures()
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("phar")) die("skip");
|
||||
if (extension_loaded("hash")) die("skip extension hash conflicts");
|
||||
$arr = Phar::getSupportedSignatures();
|
||||
if (!in_array("OpenSSL", $arr)) die("skip openssl support required");
|
||||
?>
|
||||
--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===
|
||||
@@ -5,7 +5,6 @@ Phar::getSupportedSignatures()
|
||||
if (!extension_loaded("phar")) die("skip");
|
||||
$arr = Phar::getSupportedSignatures();
|
||||
if (in_array("OpenSSL", $arr)) die("skip openssl support enabled");
|
||||
if (!in_array('SHA-256', $arr)) die("skip hash extension loaded shared");
|
||||
?>
|
||||
--INI--
|
||||
phar.require_hash=0
|
||||
|
||||
@@ -5,7 +5,6 @@ Phar::getSupportedSignatures()
|
||||
if (!extension_loaded("phar")) die("skip");
|
||||
$arr = Phar::getSupportedSignatures();
|
||||
if (!in_array("OpenSSL", $arr)) die("skip openssl support required");
|
||||
if (!in_array('SHA-256', $arr)) die("skip hash extension loaded shared");
|
||||
?>
|
||||
--INI--
|
||||
phar.require_hash=0
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
--TEST--
|
||||
Phar::setSignatureAlgorithm()
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
<?php if ( extension_loaded("hash")) die("skip extension hash conflicts"); ?>
|
||||
<?php if (!defined("Phar::PGP")) die("skip PGP Signature algorithm not available"); ?>
|
||||
--INI--
|
||||
phar.require_hash=0
|
||||
phar.readonly=0
|
||||
--FILE--
|
||||
<?php
|
||||
$p = new Phar(__DIR__ . '/phar_setsignaturealgo1.phar', 0, 'phar_setsignaturealgo1.phar');
|
||||
$p['file1.txt'] = 'hi';
|
||||
var_dump($p->getSignature());
|
||||
$p->setSignatureAlgorithm(Phar::MD5);
|
||||
var_dump($p->getSignature());
|
||||
$p->setSignatureAlgorithm(Phar::SHA1);
|
||||
var_dump($p->getSignature());
|
||||
try {
|
||||
$p->setSignatureAlgorithm(Phar::SHA256);
|
||||
var_dump($p->getSignature());
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
try {
|
||||
$p->setSignatureAlgorithm(Phar::SHA512);
|
||||
var_dump($p->getSignature());
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
try {
|
||||
$p->setSignatureAlgorithm(Phar::PGP);
|
||||
var_dump($p->getSignature());
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
?>
|
||||
===DONE===
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink(__DIR__ . '/phar_setsignaturealgo1.phar');
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(2) {
|
||||
["hash"]=>
|
||||
string(%d) "%s"
|
||||
["hash_type"]=>
|
||||
string(5) "SHA-1"
|
||||
}
|
||||
array(2) {
|
||||
["hash"]=>
|
||||
string(%d) "%s"
|
||||
["hash_type"]=>
|
||||
string(3) "MD5"
|
||||
}
|
||||
array(2) {
|
||||
["hash"]=>
|
||||
string(%d) "%s"
|
||||
["hash_type"]=>
|
||||
string(5) "SHA-1"
|
||||
}
|
||||
string (82) "SHA-256 and SHA-512 signatures are only supported if the hash extension is enabled"
|
||||
string (82) "SHA-256 and SHA-512 signatures are only supported if the hash extension is enabled"
|
||||
array(2) {
|
||||
["hash"]=>
|
||||
string(%d) "%s"
|
||||
["hash_type"]=>
|
||||
string(5) "SHA-1"
|
||||
}
|
||||
===DONE===
|
||||
@@ -5,7 +5,6 @@ Phar::setSupportedSignatures() with hash
|
||||
if (!extension_loaded("phar")) die("skip");
|
||||
$arr = Phar::getSupportedSignatures();
|
||||
if (!in_array("OpenSSL", $arr)) die("skip openssl support required");
|
||||
if (!in_array('SHA-256', $arr)) die("skip hash extension loaded shared");
|
||||
?>
|
||||
--INI--
|
||||
phar.require_hash=0
|
||||
|
||||
@@ -5,7 +5,6 @@ Phar::setSupportedSignatures() with hash, tar-based
|
||||
<?php
|
||||
$arr = Phar::getSupportedSignatures();
|
||||
if (!in_array("OpenSSL", $arr)) die("skip openssl support required");
|
||||
if (!in_array('SHA-256', $arr)) die("skip hash extension loaded shared"); ?>
|
||||
--INI--
|
||||
phar.require_hash=0
|
||||
phar.readonly=0
|
||||
|
||||
@@ -5,7 +5,6 @@ Phar: verify signature parsing works
|
||||
if (!extension_loaded("phar")) die("skip");
|
||||
$arr = Phar::getSupportedSignatures();
|
||||
if (!in_array("OpenSSL", $arr)) die("skip openssl support required");
|
||||
if (!in_array('SHA-256', $arr)) die("skip hash extension loaded shared");
|
||||
?>
|
||||
--INI--
|
||||
phar.require_hash=0
|
||||
|
||||
@@ -5,7 +5,6 @@ Phar::setSupportedSignatures() with hash, zip-based
|
||||
<?php
|
||||
$arr = Phar::getSupportedSignatures();
|
||||
if (!in_array("OpenSSL", $arr)) die("skip openssl support required");
|
||||
if (!in_array('SHA-256', $arr)) die("skip hash extension loaded shared"); ?>
|
||||
--INI--
|
||||
phar.require_hash=0
|
||||
phar.readonly=0
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
--TEST--
|
||||
php://fd wrapper: invalid file descriptor
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc');
|
||||
if(substr(PHP_OS, 0, 3) == "WIN")
|
||||
die("skip Not for Windows");
|
||||
|
||||
//we'd need a release and a test variation for windows, because in debug builds we get this message:
|
||||
//Warning: Invalid parameter detected in CRT function '_dup' (f:\dd\vctools\crt_bld\self_x86\crt\src\dup.c:52)
|
||||
//I greped the CRT sources and found no function capable of validating a file descriptor
|
||||
--FILE--
|
||||
<?php
|
||||
fopen("php://fd/12", "w");
|
||||
|
||||
Reference in New Issue
Block a user