From 778f08ff06987ce4d7c8eaf9381b5d407479a5d9 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sat, 29 Jun 2019 14:46:51 +0200 Subject: [PATCH 1/2] Fix missing file and remove SKIP section Test now passes on VC 14, 15 and 16 with current MSVC runtimes. --- ext/standard/tests/file/php_fd_wrapper_04.phpt | 8 -------- 1 file changed, 8 deletions(-) diff --git a/ext/standard/tests/file/php_fd_wrapper_04.phpt b/ext/standard/tests/file/php_fd_wrapper_04.phpt index 3946367ef02..2b3a69ce1af 100644 --- a/ext/standard/tests/file/php_fd_wrapper_04.phpt +++ b/ext/standard/tests/file/php_fd_wrapper_04.phpt @@ -1,13 +1,5 @@ --TEST-- php://fd wrapper: invalid file descriptor ---SKIPIF-- - Date: Sat, 29 Jun 2019 14:40:31 +0200 Subject: [PATCH 2/2] Fix phar tests with hash extension - The hash extension is now always available. - Remove unfinished test The Phar::PGP currently doesn't exist yet. --- ext/phar/tests/phar_buildfromiterator10.phpt | 4 +- .../phar_get_supported_signatures_001.phpt | 26 ------- .../phar_get_supported_signatures_001a.phpt | 28 -------- .../phar_get_supported_signatures_002.phpt | 1 - .../phar_get_supported_signatures_002a.phpt | 1 - ext/phar/tests/phar_setsignaturealgo1.phpt | 70 ------------------- ext/phar/tests/phar_setsignaturealgo2.phpt | 1 - .../tests/tar/phar_setsignaturealgo2.phpt | 1 - ext/phar/tests/test_signaturealgos.phpt | 1 - .../tests/zip/phar_setsignaturealgo2.phpt | 1 - 10 files changed, 1 insertion(+), 133 deletions(-) delete mode 100644 ext/phar/tests/phar_get_supported_signatures_001.phpt delete mode 100644 ext/phar/tests/phar_get_supported_signatures_001a.phpt delete mode 100644 ext/phar/tests/phar_setsignaturealgo1.phpt diff --git a/ext/phar/tests/phar_buildfromiterator10.phpt b/ext/phar/tests/phar_buildfromiterator10.phpt index 7b7eca0e6fa..a7b9c8701b5 100644 --- a/ext/phar/tests/phar_buildfromiterator10.phpt +++ b/ext/phar/tests/phar_buildfromiterator10.phpt @@ -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"]=> diff --git a/ext/phar/tests/phar_get_supported_signatures_001.phpt b/ext/phar/tests/phar_get_supported_signatures_001.phpt deleted file mode 100644 index 64874f66e0b..00000000000 --- a/ext/phar/tests/phar_get_supported_signatures_001.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -Phar::getSupportedSignatures() ---SKIPIF-- - ---INI-- -phar.require_hash=0 -phar.readonly=0 ---FILE-- - -===DONE=== -?> ---EXPECT-- -array(2) { - [0]=> - string(3) "MD5" - [1]=> - string(5) "SHA-1" -} -===DONE=== diff --git a/ext/phar/tests/phar_get_supported_signatures_001a.phpt b/ext/phar/tests/phar_get_supported_signatures_001a.phpt deleted file mode 100644 index ad929df2621..00000000000 --- a/ext/phar/tests/phar_get_supported_signatures_001a.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -Phar::getSupportedSignatures() ---SKIPIF-- - ---INI-- -phar.require_hash=0 -phar.readonly=0 ---FILE-- - -===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_002.phpt b/ext/phar/tests/phar_get_supported_signatures_002.phpt index 7e17aedca55..d55785264d7 100644 --- a/ext/phar/tests/phar_get_supported_signatures_002.phpt +++ b/ext/phar/tests/phar_get_supported_signatures_002.phpt @@ -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 diff --git a/ext/phar/tests/phar_get_supported_signatures_002a.phpt b/ext/phar/tests/phar_get_supported_signatures_002a.phpt index 7260607a145..391ee600cc4 100644 --- a/ext/phar/tests/phar_get_supported_signatures_002a.phpt +++ b/ext/phar/tests/phar_get_supported_signatures_002a.phpt @@ -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 diff --git a/ext/phar/tests/phar_setsignaturealgo1.phpt b/ext/phar/tests/phar_setsignaturealgo1.phpt deleted file mode 100644 index 0b8647b64c2..00000000000 --- a/ext/phar/tests/phar_setsignaturealgo1.phpt +++ /dev/null @@ -1,70 +0,0 @@ ---TEST-- -Phar::setSignatureAlgorithm() ---SKIPIF-- - - - ---INI-- -phar.require_hash=0 -phar.readonly=0 ---FILE-- -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-- - ---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=== diff --git a/ext/phar/tests/phar_setsignaturealgo2.phpt b/ext/phar/tests/phar_setsignaturealgo2.phpt index 92b7b2dcf13..726e756a656 100644 --- a/ext/phar/tests/phar_setsignaturealgo2.phpt +++ b/ext/phar/tests/phar_setsignaturealgo2.phpt @@ -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 diff --git a/ext/phar/tests/tar/phar_setsignaturealgo2.phpt b/ext/phar/tests/tar/phar_setsignaturealgo2.phpt index d854455df9b..28d494e9e89 100644 --- a/ext/phar/tests/tar/phar_setsignaturealgo2.phpt +++ b/ext/phar/tests/tar/phar_setsignaturealgo2.phpt @@ -5,7 +5,6 @@ Phar::setSupportedSignatures() with hash, tar-based --INI-- phar.require_hash=0 phar.readonly=0 diff --git a/ext/phar/tests/test_signaturealgos.phpt b/ext/phar/tests/test_signaturealgos.phpt index f94a02924ef..69fafdb08ba 100644 --- a/ext/phar/tests/test_signaturealgos.phpt +++ b/ext/phar/tests/test_signaturealgos.phpt @@ -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 diff --git a/ext/phar/tests/zip/phar_setsignaturealgo2.phpt b/ext/phar/tests/zip/phar_setsignaturealgo2.phpt index 6ecceb98521..53f9461c985 100644 --- a/ext/phar/tests/zip/phar_setsignaturealgo2.phpt +++ b/ext/phar/tests/zip/phar_setsignaturealgo2.phpt @@ -5,7 +5,6 @@ Phar::setSupportedSignatures() with hash, zip-based --INI-- phar.require_hash=0 phar.readonly=0