No Description

DownloadTest.php 706B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Qiniu\Tests;
  3. use Qiniu\Http\Client;
  4. class DownloadTest extends \PHPUnit_Framework_TestCase
  5. {
  6. public function test()
  7. {
  8. global $testAuth;
  9. $base_url = 'http://sdk.peterpy.cn/gogopher.jpg';
  10. $private_url = $testAuth->privateDownloadUrl($base_url);
  11. $response = Client::get($private_url);
  12. $this->assertEquals(200, $response->statusCode);
  13. }
  14. public function testFop()
  15. {
  16. global $testAuth;
  17. $base_url = 'http://sdk.peterpy.cn/gogopher.jpg?exif';
  18. $private_url = $testAuth->privateDownloadUrl($base_url);
  19. $response = Client::get($private_url);
  20. $this->assertEquals(200, $response->statusCode);
  21. }
  22. }