1
0
mirror of https://github.com/php/php-src.git synced 2026-04-16 20:41:18 +02:00
Files
archived-php-src/ext/hash/tests/hash_update_stream.phpt
Christoph M. Becker 701d1ab0cc Fix skip condition
The test is not about mhash, but rather about hash.
2018-02-23 16:23:55 +01:00

21 lines
498 B
PHP

--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 (!extension_loaded('hash')) die('skip hash extension not available');
?>
--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