diff options
Diffstat (limited to 'ext/hash')
-rw-r--r-- | ext/hash/tests/hash_algos.phpt | 4 | ||||
-rw-r--r-- | ext/hash/tests/hash_copy_001.phpt | 2 | ||||
-rw-r--r-- | ext/hash/tests/hash_copy_002.phpt | 2 | ||||
-rw-r--r-- | ext/hash/tests/hash_error.phpt | 6 | ||||
-rw-r--r-- | ext/hash/tests/hash_file_basic.phpt | 4 | ||||
-rw-r--r-- | ext/hash/tests/hash_file_basic1.phpt | 10 | ||||
-rw-r--r-- | ext/hash/tests/hash_file_error.phpt | 4 | ||||
-rw-r--r-- | ext/hash/tests/hash_hmac_algos.phpt | 2 | ||||
-rw-r--r-- | ext/hash/tests/hash_hmac_basic.phpt | 4 | ||||
-rw-r--r-- | ext/hash/tests/hash_hmac_error.phpt | 2 | ||||
-rw-r--r-- | ext/hash/tests/hash_hmac_file_basic.phpt | 10 | ||||
-rw-r--r-- | ext/hash/tests/hash_hmac_file_error.phpt | 6 | ||||
-rw-r--r-- | ext/hash/tests/joaat.phpt | 2 | ||||
-rw-r--r-- | ext/hash/tests/mhash_002.phpt | 4 |
14 files changed, 31 insertions, 31 deletions
diff --git a/ext/hash/tests/hash_algos.phpt b/ext/hash/tests/hash_algos.phpt index 0014f95b1d..f25bf38a04 100644 --- a/ext/hash/tests/hash_algos.phpt +++ b/ext/hash/tests/hash_algos.phpt @@ -1,5 +1,5 @@ --TEST-- -Test hash_algos() function : basic functionality +Test hash_algos() function : basic functionality --SKIPIF-- <?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?> --FILE-- @@ -8,7 +8,7 @@ Test hash_algos() function : basic functionality /* Prototype : array hash_algos (void) * Description: Return a list of registered hashing algorithms * Source code: ext/hash/hash.c - * Alias to functions: + * Alias to functions: */ echo "*** Testing hash_algos() : basic functionality ***\n"; diff --git a/ext/hash/tests/hash_copy_001.phpt b/ext/hash/tests/hash_copy_001.phpt index cd1af4de09..1b23c32cf9 100644 --- a/ext/hash/tests/hash_copy_001.phpt +++ b/ext/hash/tests/hash_copy_001.phpt @@ -30,7 +30,7 @@ foreach ($algos as $algo) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- string(3) "md2" string(32) "d5ac4ffd08f6a57b9bd402b8068392ff" string(32) "d5ac4ffd08f6a57b9bd402b8068392ff" diff --git a/ext/hash/tests/hash_copy_002.phpt b/ext/hash/tests/hash_copy_002.phpt index 5fbbf5b4d8..2b6ce4a07b 100644 --- a/ext/hash/tests/hash_copy_002.phpt +++ b/ext/hash/tests/hash_copy_002.phpt @@ -12,7 +12,7 @@ var_dump(hash_copy($r, $r)); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: hash_copy() expects exactly 1 parameter, 0 given in %s on line %d NULL object(HashContext)#%d (0) { diff --git a/ext/hash/tests/hash_error.phpt b/ext/hash/tests/hash_error.phpt index 8317a56e14..e51c19fbf3 100644 --- a/ext/hash/tests/hash_error.phpt +++ b/ext/hash/tests/hash_error.phpt @@ -1,5 +1,5 @@ --TEST-- -Test hash() function : error conditions +Test hash() function : error conditions --SKIPIF-- <?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?> --FILE-- @@ -8,7 +8,7 @@ Test hash() function : error conditions /* Prototype : string hash ( string $algo , string $data [, bool $raw_output ] ) * Description: Generate a hash value (message digest) * Source code: ext/hash/hash.c - * Alias to functions: + * Alias to functions: */ echo "*** Testing hash() : error conditions ***\n"; @@ -17,7 +17,7 @@ var_dump(hash()); var_dump(hash('adler32')); echo "\n-- Testing hash() function with more than expected no. of arguments --\n"; -$extra_arg= 10; +$extra_arg= 10; var_dump(hash('adler32', '', false, $extra_arg)); echo "\n-- Testing hash() function with invalid hash algorithm --\n"; diff --git a/ext/hash/tests/hash_file_basic.phpt b/ext/hash/tests/hash_file_basic.phpt index b16927d20e..dd51af64a1 100644 --- a/ext/hash/tests/hash_file_basic.phpt +++ b/ext/hash/tests/hash_file_basic.phpt @@ -1,5 +1,5 @@ --TEST-- -Test hash_file() function : basic functionality +Test hash_file() function : basic functionality --SKIPIF-- <?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?> --CREDITS-- @@ -9,7 +9,7 @@ Felix De Vliegher <felix.devliegher@gmail.com> /* Prototype : string hash_file(string algo, string filename[, bool raw_output = false]) * Description: Generate a hash of a given file * Source code: ext/hash/hash.c - * Alias to functions: + * Alias to functions: */ echo "*** Testing hash_file() : basic functionality ***\n"; diff --git a/ext/hash/tests/hash_file_basic1.phpt b/ext/hash/tests/hash_file_basic1.phpt index 9a2bc01016..b0e286d741 100644 --- a/ext/hash/tests/hash_file_basic1.phpt +++ b/ext/hash/tests/hash_file_basic1.phpt @@ -1,5 +1,5 @@ --TEST-- -Test hash_file() function : basic functionality +Test hash_file() function : basic functionality --SKIPIF-- <?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?> --FILE-- @@ -8,7 +8,7 @@ Test hash_file() function : basic functionality /* Prototype : string hash_file ( string algo, string filename [, bool raw_output] ) * Description: Generate a hash value using the contents of a given file * Source code: ext/hash/hash.c - * Alias to functions: + * Alias to functions: */ echo "*** Testing hash_file() : basic functionality ***\n"; @@ -18,9 +18,9 @@ $file = dirname(__FILE__) . "hash_file.txt"; if (($fp = fopen( $file, "w+")) == FALSE) { echo "Cannot create file ($file)"; exit; -} +} -/* Writing into file */ +/* Writing into file */ $content = "This is a sample string used to test the hash_file function with various hashing algorithms"; if (is_writable($file)) { if (fwrite($fp, $content) === FALSE) { @@ -29,7 +29,7 @@ if (is_writable($file)) { } } -// close the file +// close the file fclose($fp); echo "adler32: " . hash_file('adler32', $file) . "\n"; diff --git a/ext/hash/tests/hash_file_error.phpt b/ext/hash/tests/hash_file_error.phpt index 96c41e6432..7a3b604e67 100644 --- a/ext/hash/tests/hash_file_error.phpt +++ b/ext/hash/tests/hash_file_error.phpt @@ -1,5 +1,5 @@ --TEST-- -Test hash_file() function : error conditions +Test hash_file() function : error conditions --SKIPIF-- <?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?> --CREDITS-- @@ -9,7 +9,7 @@ Felix De Vliegher <felix.devliegher@gmail.com> /* Prototype : string hash_file(string algo, string filename[, bool raw_output = false]) * Description: Generate a hash of a given file * Source code: ext/hash/hash.c - * Alias to functions: + * Alias to functions: */ echo "*** Testing hash_file() : error conditions ***\n"; diff --git a/ext/hash/tests/hash_hmac_algos.phpt b/ext/hash/tests/hash_hmac_algos.phpt index 89877b7c12..b5b118f549 100644 --- a/ext/hash/tests/hash_hmac_algos.phpt +++ b/ext/hash/tests/hash_hmac_algos.phpt @@ -1,5 +1,5 @@ --TEST-- -Test hash_hmac_algos() function : basic functionality +Test hash_hmac_algos() function : basic functionality --SKIPIF-- <?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?> --FILE-- diff --git a/ext/hash/tests/hash_hmac_basic.phpt b/ext/hash/tests/hash_hmac_basic.phpt index ad4e754e55..7db710cf82 100644 --- a/ext/hash/tests/hash_hmac_basic.phpt +++ b/ext/hash/tests/hash_hmac_basic.phpt @@ -1,5 +1,5 @@ --TEST-- -Test hash_file() function : basic functionality +Test hash_file() function : basic functionality --SKIPIF-- <?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?> --FILE-- @@ -8,7 +8,7 @@ Test hash_file() function : basic functionality /* Prototype : string hash_hmac ( string $algo , string $data , string $key [, bool $raw_output ] ) * Description: Generate a keyed hash value using the HMAC method * Source code: ext/hash/hash.c - * Alias to functions: + * Alias to functions: */ echo "*** Testing hash_hmac() : basic functionality ***\n"; diff --git a/ext/hash/tests/hash_hmac_error.phpt b/ext/hash/tests/hash_hmac_error.phpt index bff478a55e..b9a9e535d3 100644 --- a/ext/hash/tests/hash_hmac_error.phpt +++ b/ext/hash/tests/hash_hmac_error.phpt @@ -1,5 +1,5 @@ --TEST-- -Test hash_hmac() function : basic functionality +Test hash_hmac() function : basic functionality --SKIPIF-- <?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?> --FILE-- diff --git a/ext/hash/tests/hash_hmac_file_basic.phpt b/ext/hash/tests/hash_hmac_file_basic.phpt index 8ac248756c..e2f6da14de 100644 --- a/ext/hash/tests/hash_hmac_file_basic.phpt +++ b/ext/hash/tests/hash_hmac_file_basic.phpt @@ -1,5 +1,5 @@ --TEST-- -Test hash_hmac_file() function : basic functionality +Test hash_hmac_file() function : basic functionality --SKIPIF-- <?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?> --FILE-- @@ -9,7 +9,7 @@ Test hash_hmac_file() function : basic functionality /* Prototype : string hash_hmac_file ( string algo, string filename, string key [, bool raw_output] ) * Description: Generate a keyed hash value using the HMAC method and the contents of a given file * Source code: ext/hash/hash.c - * Alias to functions: + * Alias to functions: */ echo "*** Testing hash_hmac_file() : basic functionality ***\n"; @@ -19,9 +19,9 @@ $file = dirname(__FILE__) . "hash_hmac_file.txt"; if (($fp = fopen( $file, "w+")) == FALSE) { echo "Cannot create file ($file)"; exit; -} +} -/* Writing into file */ +/* Writing into file */ $content = "This is a sample string used to test the hash_hmac_file function with various hashing algorithms"; if (is_writable($file)) { if (fwrite($fp, $content) === FALSE) { @@ -30,7 +30,7 @@ if (is_writable($file)) { } } -// close the files +// close the files fclose($fp); $key = 'secret'; diff --git a/ext/hash/tests/hash_hmac_file_error.phpt b/ext/hash/tests/hash_hmac_file_error.phpt index 29adbddba8..61f9e4d265 100644 --- a/ext/hash/tests/hash_hmac_file_error.phpt +++ b/ext/hash/tests/hash_hmac_file_error.phpt @@ -1,5 +1,5 @@ --TEST-- -Test hash_hmac_file() function : basic functionality +Test hash_hmac_file() function : basic functionality --SKIPIF-- <?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?> --FILE-- @@ -8,7 +8,7 @@ Test hash_hmac_file() function : basic functionality /* Prototype : string hash_hmac_file ( string algo, string filename, string key [, bool raw_output] ) * Description: Generate a keyed hash value using the HMAC method and the contents of a given file * Source code: ext/hash/hash.c - * Alias to functions: + * Alias to functions: */ echo "*** Testing hash() : error conditions ***\n"; @@ -22,7 +22,7 @@ var_dump(hash_hmac_file('crc32')); var_dump(hash_hmac_file('crc32', $file)); echo "\n-- Testing hash_hmac_file() function with more than expected no. of arguments --\n"; -$extra_arg = 10; +$extra_arg = 10; hash_hmac_file('crc32', $file, $key, TRUE, $extra_arg); echo "\n-- Testing hash_hmac_file() function with invalid hash algorithm --\n"; diff --git a/ext/hash/tests/joaat.phpt b/ext/hash/tests/joaat.phpt index fa310a96e2..63751c9f3b 100644 --- a/ext/hash/tests/joaat.phpt +++ b/ext/hash/tests/joaat.phpt @@ -17,7 +17,7 @@ $pass = true; foreach ($tests as $test) { ++$i; - + $result = hash("joaat", $test[0]); if ($result != $test[1]) { echo "Iteration " . $i . " failed - expected '" . $test[1] . "', got '" . $result . "' for '" . $test[1] . "'\n"; diff --git a/ext/hash/tests/mhash_002.phpt b/ext/hash/tests/mhash_002.phpt index 45cf09fb77..a44bb4b555 100644 --- a/ext/hash/tests/mhash_002.phpt +++ b/ext/hash/tests/mhash_002.phpt @@ -29,7 +29,7 @@ $supported_hash_al = array( $hc = mhash_count() + 1; -$known_hash_al = array(); +$known_hash_al = array(); for ($i=0; $i < $hc; $i++) { $known_hash_al[mhash_get_hash_name($i)] = $i; } @@ -40,7 +40,7 @@ foreach ($supported_hash_al as $name => $len) { echo "$name = $len\n"; } else { echo "$name ? $len\n"; - } + } } ?> --EXPECTREGEX-- |