No Description

Crc32Test.php 412B

12345678910111213141516171819202122
  1. <?php
  2. namespace Qiniu\Tests;
  3. use Qiniu;
  4. class Crc32Test extends \PHPUnit_Framework_TestCase
  5. {
  6. public function testData()
  7. {
  8. $a = '你好';
  9. $b = \Qiniu\crc32_data($a);
  10. $this->assertEquals('1352841281', $b);
  11. }
  12. public function testFile()
  13. {
  14. $b = \Qiniu\crc32_file(__file__);
  15. $c = \Qiniu\crc32_file(__file__);
  16. $this->assertEquals($c, $b);
  17. }
  18. }