diff options
| author | Scott MacVicar <scottmac@php.net> | 2008-09-18 11:59:13 +0000 |
|---|---|---|
| committer | Scott MacVicar <scottmac@php.net> | 2008-09-18 11:59:13 +0000 |
| commit | d875c9f889a92e7a435527958de96498fa1c3133 (patch) | |
| tree | 330bd803112660bf1a341cefcd2517bd519fa6aa /ext/hash/tests | |
| parent | 766ad69755c67cceb50b4ab581b9262be4002f4b (diff) | |
| download | php-git-d875c9f889a92e7a435527958de96498fa1c3133.tar.gz | |
MFH: mhash algorithm parameter was modified when it was a zval, also update a test.
Diffstat (limited to 'ext/hash/tests')
| -rw-r--r-- | ext/hash/tests/mhash_001.phpt | 2 | ||||
| -rw-r--r-- | ext/hash/tests/mhash_004.phpt | 21 |
2 files changed, 22 insertions, 1 deletions
diff --git a/ext/hash/tests/mhash_001.phpt b/ext/hash/tests/mhash_001.phpt index 2d40e68d64..f70ebaf8ff 100644 --- a/ext/hash/tests/mhash_001.phpt +++ b/ext/hash/tests/mhash_001.phpt @@ -33,7 +33,7 @@ foreach ($supported_hash_al as $hash=>$wanted) { echo "$hash: "; var_dump($wanted); echo "$hash: "; - var_dump($result); + var_dump(bin2hex($result)); } echo "\n"; } diff --git a/ext/hash/tests/mhash_004.phpt b/ext/hash/tests/mhash_004.phpt new file mode 100644 index 0000000000..2721663332 --- /dev/null +++ b/ext/hash/tests/mhash_004.phpt @@ -0,0 +1,21 @@ +--TEST-- +mhash() modifying algorithm parameter +--INI-- +magic_quotes_runtime=0 +--SKIPIF-- +<?php + include "skip_mhash.inc"; +?> +--FILE-- +<?php + +$algo = MHASH_MD5; +var_dump($algo); +var_dump(bin2hex(mhash($algo, "test"))); +var_dump($algo); + +?> +--EXPECT-- +int(1) +string(32) "098f6bcd4621d373cade4e832627b4f6" +int(1) |
