diff options
author | Joe Watkins <krakjoe@php.net> | 2016-10-17 16:49:24 +0100 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2016-10-17 17:01:39 +0100 |
commit | 39ee3184ee42a0ad9314cbb7c75cb72a75b850f5 (patch) | |
tree | 4cb827f4fa8c9f654439baed2bdc329ad849d5b7 | |
parent | 5eb84337a6b0a2ea0f6fa85c7ba610da117100fd (diff) | |
download | php-git-39ee3184ee42a0ad9314cbb7c75cb72a75b850f5.tar.gz |
Merge branch 'pull-request/1817'
-rw-r--r-- | ext/hash/tests/hash_update_file.phpt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/hash/tests/hash_update_file.phpt b/ext/hash/tests/hash_update_file.phpt new file mode 100644 index 0000000000..32ce962bd0 --- /dev/null +++ b/ext/hash/tests/hash_update_file.phpt @@ -0,0 +1,21 @@ +--TEST-- +bool hash_update_file ( resource $hcontext , string $filename [, resource $scontext = NULL ] ); +--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 +$ctx = hash_init('md5'); +$filePath = __DIR__ . DIRECTORY_SEPARATOR . 'sha1.phpt'; +fopen($filePath, "r"); +var_dump(hash_update_file($ctx, $filePath)); +hash_final($ctx); +?> +--EXPECT-- +bool(true) |