com php-src: Merge branch 'pull-request/1816': ext/hash/tests/h ash_update_stream.phpt
| From: | Joe Watkins | Date: | Mon, 17 Oct 2016 16:02:19 +0000 |
| Subject: | com php-src: Merge branch 'pull-request/1816': ext/hash/tests/h ash_update_stream.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95161@lists.php.net to get a copy of this message | ||
Commit: 4dfd5f4403be85d467992bf8a6bae4de40d4a06e
Author: Joe Watkins <krakjoe@php.net> Mon, 17 Oct 2016 16:50:12 +0100
Parents: d6fb5a1f1e690aca9b6a7508281c90414c5fed81
Branches: PHP-7.1
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4dfd5f4403be85d467992bf8a6bae4de40d4a06e
Log:
Merge branch 'pull-request/1816'
Changed paths:
A ext/hash/tests/hash_update_stream.phpt
Diff:
diff --git a/ext/hash/tests/hash_update_stream.phpt b/ext/hash/tests/hash_update_stream.phpt
new file mode 100644
index 0000000..b628b9c
--- /dev/null
+++ b/ext/hash/tests/hash_update_stream.phpt
@@ -0,0 +1,23 @@
+--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 (phpversion() < "5.3.0") {
+ die('SKIP php version so lower.');
+}
+require_once(dirname(__FILE__) . '/skip_mhash.inc'); ?>
+?>
+--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