mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
Merge branch 'pull-request/1816'
This commit is contained in:
parent
d6fb5a1f1e
commit
4dfd5f4403
23
ext/hash/tests/hash_update_stream.phpt
Normal file
23
ext/hash/tests/hash_update_stream.phpt
Normal file
@ -0,0 +1,23 @@
|
||||
--TEST--
|
||||
int hash_update_stream ( resource $context , resource $handle [, int $length = -1 ] );
|
||||
--CREDITS--
|
||||
marcosptf - <marcosptf@yahoo.com.br> - @phpsp - sao paulo - br
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (phpversion() < "5.3.0") {
|
||||
die('SKIP php version so lower.');
|
||||
}
|
||||
require_once(dirname(__FILE__) . '/skip_mhash.inc'); ?>
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$fp = tmpfile();
|
||||
fwrite($fp, 'The quick brown fox jumped over the lazy dog.');
|
||||
rewind($fp);
|
||||
|
||||
$ctx = hash_init('md5');
|
||||
hash_update_stream($ctx, $fp);
|
||||
echo hash_final($ctx);
|
||||
?>
|
||||
--EXPECT--
|
||||
5c6ffbdd40d9556b73a21e63c3e0e904
|
Loading…
Reference in New Issue
Block a user