DownloadTest.php 724 B

12345678910111213141516171819202122232425
  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://private-res.qiniudn.com/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://private-res.qiniudn.com/gogopher.jpg?exif';
  18. $private_url = $testAuth->privateDownloadUrl($base_url);
  19. $response = Client::get($private_url);
  20. $this->assertEquals(200, $response->statusCode);
  21. }
  22. }