1--TEST--
2hash_update_file() function - basic test
3--CREDITS--
4marcosptf - <marcosptf@yahoo.com.br> - @phpsp - sao paulo - br
5--SKIPIF--
6<?php
7if (!extension_loaded('hash')) die('skip hash extension not available');
8?>
9--FILE--
10<?php
11$filePath = __DIR__ . DIRECTORY_SEPARATOR . 'hash_update_stream.txt';
12file_put_contents($filePath, 'The quick brown fox jumped over the lazy dog.');
13
14$ctx = hash_init('md5');
15var_dump(hash_update_file($ctx, $filePath));
16echo hash_final($ctx);
17?>
18--EXPECT--
19bool(true)
205c6ffbdd40d9556b73a21e63c3e0e904
21--CLEAN--
22<?php
23unlink(__DIR__ . DIRECTORY_SEPARATOR . 'hash_update_stream.txt');
24?>
25