From 2be34cf0458f83e73ac41b470e91a61fdb23c78d Mon Sep 17 00:00:00 2001 From: lewzylu Date: Tue, 24 Sep 2019 21:46:51 +0800 Subject: [PATCH 1/2] update Test --- src/Qcloud/Cos/Tests/Test.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Qcloud/Cos/Tests/Test.php b/src/Qcloud/Cos/Tests/Test.php index c025e8be..308594c4 100644 --- a/src/Qcloud/Cos/Tests/Test.php +++ b/src/Qcloud/Cos/Tests/Test.php @@ -1178,19 +1178,19 @@ public function testCopySmallObject() { */ public function testCopyLargeObject() { try{ - $key = '你好.txt'; + $src_key = '你好.txt'; $dst_key = 'hi.txt'; $body = $this->generateRandomString(3*1024*1024+1023); $md5 = base64_encode(md5($body, true)); $this->cosClient->upload($bucket=$this->bucket, - $key=$key, + $key=$src_key, $body=$body, $options=['PartSize'=>1024 * 1024 + 1]); $this->cosClient->copy($bucket=$this->bucket, $key=$dst_key, $copySource = ['Bucket'=>$this->bucket, 'Region'=>$this->region, - 'Key'=>$key], + 'Key'=>$src_key], $options=['PartSize'=>1024 * 1024 + 1]); $rt = $this->cosClient->getObject(['Bucket'=>$this->bucket, 'Key'=>$dst_key]); From 4186c5ff5e47c76c4b1eb760538012b86c7991f2 Mon Sep 17 00:00:00 2001 From: lewzylu Date: Tue, 24 Sep 2019 21:49:16 +0800 Subject: [PATCH 2/2] update Test --- src/Qcloud/Cos/Tests/Test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Qcloud/Cos/Tests/Test.php b/src/Qcloud/Cos/Tests/Test.php index 308594c4..a979cd4c 100644 --- a/src/Qcloud/Cos/Tests/Test.php +++ b/src/Qcloud/Cos/Tests/Test.php @@ -1180,7 +1180,7 @@ public function testCopyLargeObject() { try{ $src_key = '你好.txt'; $dst_key = 'hi.txt'; - $body = $this->generateRandomString(3*1024*1024+1023); + $body = $this->generateRandomString(3*1024*1024+333); $md5 = base64_encode(md5($body, true)); $this->cosClient->upload($bucket=$this->bucket, $key=$src_key,