data_center/vendor/qiniu/php-sdk/tests/Qiniu/Tests/Crc32Test.php

22 lines
412 B
PHP
Raw Permalink Normal View History

2023-09-18 09:11:13 +08:00
<?php
namespace Qiniu\Tests;
use Qiniu;
class Crc32Test extends \PHPUnit_Framework_TestCase
{
public function testData()
{
$a = '你好';
$b = \Qiniu\crc32_data($a);
$this->assertEquals('1352841281', $b);
}
public function testFile()
{
$b = \Qiniu\crc32_file(__file__);
$c = \Qiniu\crc32_file(__file__);
$this->assertEquals($c, $b);
}
}