Inheritance: extends PHPUnit_Framework_TestCase
コード例 #1
0
 public function setUp()
 {
     parent::setUp();
     /**
      *  上传本地变量到bucket
      */
     $object = "a.file";
     $content = file_get_contents(__FILE__);
     $options = array(OssClient::OSS_LENGTH => strlen($content), OssClient::OSS_HEADERS => array('Expires' => 'Fri, 28 Feb 2020 05:38:42 GMT', 'Cache-Control' => 'no-cache', 'Content-Disposition' => 'attachment;filename=oss_download.log', 'Content-Encoding' => 'utf-8', 'Content-Language' => 'zh-CN', 'x-oss-server-side-encryption' => 'AES256', 'x-oss-meta-self-define-title' => 'user define meta info'));
     try {
         $this->ossClient->putObject($this->bucket, $object, $content, $options);
     } catch (OssException $e) {
         $this->assertFalse(true);
     }
 }
コード例 #2
0
ファイル: OssClientObjectTest.php プロジェクト: waqt/kdweb
 public function setUp()
 {
     parent::setUp();
     $this->ossClient->putObject($this->bucket, 'oss-php-sdk-test/upload-test-object-name.txt', file_get_contents(__FILE__));
 }
コード例 #3
0
 public function setUp()
 {
     parent::setUp();
 }