Example #1
0
 public function test8M()
 {
     $file = qiniuTempFile(8 * 1024 * 1024);
     list($r, $error) = Etag::sum($file);
     unlink($file);
     $this->assertEquals('ljpekgMJ9VSYlE8hMX06GIWXxfDI', $r);
     $this->assertNull($error);
 }
Example #2
0
<?php

require_once __DIR__ . '/../autoload.php';
use Qiniu\Etag;
list($etag, $err) = Etag::sum(__FILE__);
if ($err == null) {
    echo "Etag: {$etag}";
} else {
    var_dump($err);
}
 /**
  * @DriverFunction
  * @param $localFilePath
  * @return array
  */
 public function calculateQetag($localFilePath)
 {
     return Etag::sum($localFilePath);
 }