--TEST--
-bool hash_update_file ( resource $hcontext , string $filename [, resource $scontext = NULL ] );
+hash_update_file() function - basic test
--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'); ?>
+if (!extension_loaded('hash')) die('skip hash extension not available');
?>
--FILE--
<?php
+$filePath = __DIR__ . DIRECTORY_SEPARATOR . 'hash_update_stream.txt';
+file_put_contents($filePath, 'The quick brown fox jumped over the lazy dog.');
+
$ctx = hash_init('md5');
-$filePath = __DIR__ . DIRECTORY_SEPARATOR . 'sha1.phpt';
-fopen($filePath, "r");
var_dump(hash_update_file($ctx, $filePath));
-hash_final($ctx);
+echo hash_final($ctx);
?>
--EXPECT--
bool(true)
+5c6ffbdd40d9556b73a21e63c3e0e904
+--CLEAN--
+<?php
+unlink(__DIR__ . DIRECTORY_SEPARATOR . 'hash_update_stream.txt');
+?>