com php-src: test to function hash_update_file();: ext/hash/tests/hash_update_file.phpt

From: Date: Sun, 13 Mar 2016 17:14:03 +0000
Subject: com php-src: test to function hash_update_file();: ext/hash/tests/hash_update_file.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-95151@lists.php.net to get a copy of this message
Commit: 547118e2f1e639884541542de0764a48ff7d4d54 Author: marcosptf <marcosptf@yahoo.com.br> Sun, 13 Mar 2016 14:14:03 -0300 Parents: 01579ae0a6eda82b72a8d44d5cbdeef50a21ca79 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=547118e2f1e639884541542de0764a48ff7d4d54 Log: test to function hash_update_file(); was added new test to uncoverage function from hash module Changed paths: A ext/hash/tests/hash_update_file.phpt Diff: diff --git a/ext/hash/tests/hash_update_file.phpt b/ext/hash/tests/hash_update_file.phpt new file mode 100644 index 0000000..32ce962 --- /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)

« previous php.cvs (#95151) next »