Skip to content

Commit f73c010

Browse files
committed
Update hash tests for consistency in their titles and remove the skipif sections (except for the mhash related tests)
1 parent bf34442 commit f73c010

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+67
-198
lines changed

ext/hash/tests/adler32.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
ADLER32
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip'); ?>
2+
Hash: ADLER32 algorithm
53
--FILE--
64
<?php
75
echo hash('adler32', ''), "\n";

ext/hash/tests/bug52240.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #52240 (hash_copy() does not copy the HMAC key, causes wrong results and PHP crashes)
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip'); ?>
53
--FILE--
64
<?php
75

ext/hash/tests/bug64745.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
Bug #64745 hash_pbkdf2() truncates data when using default length and hex output
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip'); ?>
2+
Bug #64745 (hash_pbkdf2() truncates data when using default length and hex output)
53
--FILE--
64
<?php
75
$hash = hash_pbkdf2('sha1', 'password', 'salt', 1, 0);

ext/hash/tests/bug70312.phpt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
Bug #70312 HAVAL gives wrong hashes in specific cases
3-
--SKIPIF--
4-
<?php if(!extension_loaded("hash")) print "skip"; ?>
2+
Bug #70312 (HAVAL gives wrong hashes in specific cases)
53
--FILE--
64
<?php
75
var_dump(hash('haval128,5', '1234567890123456789012345678901234567890123456789012345678901234'));
@@ -15,4 +13,4 @@ string(32) "f3f0d23819b87228b4b70ee350afaa9d"
1513
string(40) "aded6485e137f11d7292212ba3fa961714df0564"
1614
string(48) "e53da2b16269fe732e9a898a96707a9f28404d7333b02286"
1715
string(56) "c574fb307f0817b514b9bb2e7c4bfaffb7ad667aca3c8b523fefcf10"
18-
string(64) "fb73c19300b14d5cb393d929bf005e6c2d459a4c9c009e9813af1d2d3637ee8f"
16+
string(64) "fb73c19300b14d5cb393d929bf005e6c2d459a4c9c009e9813af1d2d3637ee8f"

ext/hash/tests/bug73127.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #73127 (gost-crypto hash incorrect if input data contains long 0xFF sequence)
3-
--SKIPIF--
4-
<?php if(!extension_loaded('hash')) die('skip hash extension not loaded'); ?>
53
--FILE--
64
<?php
75

ext/hash/tests/crc32.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
CRC32
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip'); ?>
2+
Hash: CRC32 algorithm
53
--FILE--
64
<?php
75
echo hash('crc32', ''), "\n";

ext/hash/tests/fnv132.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
FNV
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die ('Skip - hash extension not available'); ?>
2+
Hash: FNV132 algorithm
53
--FILE--
64
<?php
75

ext/hash/tests/fnv164.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
FNV
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die ('Skip - hash extension not available'); ?>
2+
Hash: FNV164 algorithm
53
--FILE--
64
<?php
75

ext/hash/tests/fnv1a32.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
FNV
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die ('Skip - hash extension not available'); ?>
2+
Hash: FNV1a32 algorithm
53
--FILE--
64
<?php
75

ext/hash/tests/fnv1a64.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
FNV
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die ('Skip - hash extension not available'); ?>
2+
Hash: FNV1a64 algorithm
53
--FILE--
64
<?php
75

ext/hash/tests/gost.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
gost
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip'); ?>
2+
Hash: gost algorithm
53
--FILE--
64
<?php
75
echo hash('gost', ''), "\n";

ext/hash/tests/hash-clone.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
hash_copy() via clone
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip'); ?>
2+
Hash: hash_copy() via clone
53
--FILE--
64
<?php
75

ext/hash/tests/hash_algos.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
Test hash_algos() function : basic functionality
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
2+
Hash: hash_algos() function : basic functionality
53
--FILE--
64
<?php
75

ext/hash/tests/hash_copy_001.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
hash_copy() basic tests
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip'); ?>
2+
Hash: hash_copy() basic tests
53
--FILE--
64
<?php
75

ext/hash/tests/hash_copy_002.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
hash_copy() errors
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip'); ?>
2+
Hash: hash_copy() errors
53
--FILE--
64
<?php
75

ext/hash/tests/hash_equals.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
hash_equals() function
3-
--SKIPIF--
4-
<?php if(!extension_loaded('hash')) die('skip hash extension not loaded'); ?>
2+
Hash: hash_equals() test
53
--FILE--
64
<?php
75
var_dump(hash_equals("same", "same"));

ext/hash/tests/hash_error.phpt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
Test hash() function : error conditions
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
2+
Hash: hash() function : error conditions
53
--FILE--
64
<?php
75

@@ -45,4 +43,4 @@ NULL
4543

4644
Warning: hash(): Unknown hashing algorithm: foo in %s on line %d
4745
bool(false)
48-
===Done===
46+
===Done===

ext/hash/tests/hash_file_basic.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
Test hash_file() function : basic functionality
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
2+
Hash: hash_file() function : basic functionality
53
--CREDITS--
64
Felix De Vliegher <[email protected]>
75
--FILE--

ext/hash/tests/hash_file_basic1.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
Test hash_file() function : basic functionality
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
2+
Hash: hash_file() function : basic functionality
53
--FILE--
64
<?php
75

ext/hash/tests/hash_file_error.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
Test hash_file() function : error conditions
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
2+
Hash: hash_file() function : error conditions
53
--CREDITS--
64
Felix De Vliegher <[email protected]>
75
--FILE--

ext/hash/tests/hash_hkdf_basic.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
Test hash_hkdf() function: basic functionality
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
2+
Hash: hash_hkdf() function: basic functionality
53
--FILE--
64
<?php
75

ext/hash/tests/hash_hkdf_edges.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
Test hash_hkdf() function: edge cases
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
2+
Hash: hash_hkdf() function: edge cases
53
--FILE--
64
<?php
75

ext/hash/tests/hash_hkdf_error.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
Test hash_hkdf() function: error conditions
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
2+
Hash: hash_hkdf() function: error conditions
53
--FILE--
64
<?php
75

ext/hash/tests/hash_hkdf_rfc5869.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
Test hash_hkdf() function: RFC 5869 test vectors
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
2+
Hash: hash_hkdf() function: RFC 5869 test vectors
53
--FILE--
64
<?php
75

ext/hash/tests/hash_hmac_algos.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
Test hash_hmac_algos() function : basic functionality
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
2+
Hash: hash_hmac_algos() function : basic functionality
53
--FILE--
64
<?php
75

ext/hash/tests/hash_hmac_basic.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
Test hash_file() function : basic functionality
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
2+
Hash: hash_file() function : basic functionality
53
--FILE--
64
<?php
75

ext/hash/tests/hash_hmac_error.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
Test hash_hmac() function : basic functionality
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
2+
Hash: hash_hmac() function : basic functionality
53
--FILE--
64
<?php
75
/*

ext/hash/tests/hash_hmac_file_basic.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
Test hash_hmac_file() function : basic functionality
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
2+
Hash: hash_hmac_file() function : basic functionality
53
--FILE--
64
<?php
75

ext/hash/tests/hash_hmac_file_error.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
Test hash_hmac_file() function : basic functionality
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
2+
Hash: hash_hmac_file() function : basic functionality
53
--FILE--
64
<?php
75

ext/hash/tests/hash_init_error.phpt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
--TEST--
2-
hash_init() function - errors test
3-
--SKIPIF--
4-
<?php
5-
if (!extension_loaded('hash')) die('skip hash extension not available');
6-
?>
2+
Hash: hash_init() function - errors test
73
--FILE--
84
<?php
95
echo "*** Testing hash_init(): error conditions ***\n";

ext/hash/tests/hash_pbkdf2_basic.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
Test hash_pbkdf2() function : basic functionality
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
2+
Hash: hash_pbkdf2() function : basic functionality
53
--FILE--
64
<?php
75

ext/hash/tests/hash_pbkdf2_error.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
Test hash_pbkdf2() function : error functionality
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
2+
Hash: Test hash_pbkdf2() function : error functionality
53
--FILE--
64
<?php
75

ext/hash/tests/hash_update_file.phpt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
--TEST--
2-
hash_update_file() function - basic test
2+
Hash: hash_update_file() test
33
--CREDITS--
44
marcosptf - <[email protected]> - @phpsp - sao paulo - br
5-
--SKIPIF--
6-
<?php
7-
if (!extension_loaded('hash')) die('skip hash extension not available');
8-
?>
95
--FILE--
106
<?php
117
$filePath = __DIR__ . DIRECTORY_SEPARATOR . 'hash_update_stream.txt';

ext/hash/tests/hash_update_stream.phpt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
--TEST--
2-
int hash_update_stream ( resource $context , resource $handle [, int $length = -1 ] );
2+
Hash: hash_update_stream() test
33
--CREDITS--
44
marcosptf - <[email protected]> - @phpsp - sao paulo - br
5-
--SKIPIF--
6-
<?php
7-
if (!extension_loaded('hash')) die('skip hash extension not available');
8-
?>
95
--FILE--
106
<?php
117
$fp = tmpfile();

ext/hash/tests/haval.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
haval algorithm (multi-vector, multi-pass, multi-width)
3-
--SKIPIF--
4-
<?php if(!extension_loaded("hash")) print "skip"; ?>
2+
Hash: haval algorithm (multi-vector, multi-pass, multi-width)
53
--FILE--
64
<?php
75
echo "Empty String\n";

ext/hash/tests/hmac-md5.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
hmac-md5 algorithm
3-
--SKIPIF--
4-
<?php if(!extension_loaded("hash")) print "skip"; ?>
2+
Hash: hmac-md5 algorithm
53
--FILE--
64
<?php
75
/* Test Vectors from RFC 2104 */

ext/hash/tests/joaat.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
Jenkins's one-at-a-time
3-
--SKIPIF--
4-
<?php extension_loaded('hash') or die ('Skip - hash extension not available'); ?>
2+
Hash: Jenkins's one-at-a-time
53
--FILE--
64
<?php
75
$tests = array(

ext/hash/tests/md2.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
md2 algorithm
3-
--SKIPIF--
4-
<?php if(!extension_loaded("hash")) print "skip"; ?>
2+
Hash: md2 algorithm
53
--FILE--
64
<?php
75
echo hash('md2', '') . "\n";

ext/hash/tests/md4.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
md4 algorithm
3-
--SKIPIF--
4-
<?php if(!extension_loaded("hash")) print "skip"; ?>
2+
Hash: md4 algorithm
53
--FILE--
64
<?php
75
/* RFC 1320 vectors */

ext/hash/tests/md5.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
md5 algorithm
3-
--SKIPIF--
4-
<?php if(!extension_loaded("hash")) print "skip"; ?>
2+
Hash: md5 algorithm
53
--FILE--
64
<?php
75
echo hash('md5', '') . "\n";

ext/hash/tests/mhash_001.phpt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
--TEST--
2-
mhash() test
2+
MHash: mhash() test
33
--SKIPIF--
4-
<?php
5-
include "skip_mhash.inc";
6-
?>
4+
<?php if(!function_exists('mhash')) { die('skip mhash compatibility layer not available'); } ?>
75
--FILE--
86
<?php
97

0 commit comments

Comments
 (0)