finance-pay/vendor/qiniu/php-sdk/tests/Qiniu/Tests/DownloadTest.php

26 lines
706 B
PHP
Raw Permalink Normal View History

2023-11-15 12:02:33 +08:00
<?php
namespace Qiniu\Tests;
use Qiniu\Http\Client;
class DownloadTest extends \PHPUnit_Framework_TestCase
{
public function test()
{
global $testAuth;
$base_url = 'http://sdk.peterpy.cn/gogopher.jpg';
$private_url = $testAuth->privateDownloadUrl($base_url);
$response = Client::get($private_url);
$this->assertEquals(200, $response->statusCode);
}
public function testFop()
{
global $testAuth;
$base_url = 'http://sdk.peterpy.cn/gogopher.jpg?exif';
$private_url = $testAuth->privateDownloadUrl($base_url);
$response = Client::get($private_url);
$this->assertEquals(200, $response->statusCode);
}
}