]> granicus.if.org Git - php/commitdiff
Merge branch 'pull-request/1817'
authorJoe Watkins <krakjoe@php.net>
Mon, 17 Oct 2016 15:49:24 +0000 (16:49 +0100)
committerJoe Watkins <krakjoe@php.net>
Mon, 17 Oct 2016 16:01:39 +0000 (17:01 +0100)
ext/hash/tests/hash_update_file.phpt [new file with mode: 0644]

diff --git a/ext/hash/tests/hash_update_file.phpt b/ext/hash/tests/hash_update_file.phpt
new file mode 100644 (file)
index 0000000..32ce962
--- /dev/null
@@ -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)