Skip to content

Commit 5d0ff51

Browse files
authored
Update test (#125)
* update Test * update Test
1 parent b81ee82 commit 5d0ff51

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Qcloud/Cos/Tests/Test.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,19 +1178,19 @@ public function testCopySmallObject() {
11781178
*/
11791179
public function testCopyLargeObject() {
11801180
try{
1181-
$key = '你好.txt';
1181+
$src_key = '你好.txt';
11821182
$dst_key = 'hi.txt';
1183-
$body = $this->generateRandomString(3*1024*1024+1023);
1183+
$body = $this->generateRandomString(3*1024*1024+333);
11841184
$md5 = base64_encode(md5($body, true));
11851185
$this->cosClient->upload($bucket=$this->bucket,
1186-
$key=$key,
1186+
$key=$src_key,
11871187
$body=$body,
11881188
$options=['PartSize'=>1024 * 1024 + 1]);
11891189
$this->cosClient->copy($bucket=$this->bucket,
11901190
$key=$dst_key,
11911191
$copySource = ['Bucket'=>$this->bucket,
11921192
'Region'=>$this->region,
1193-
'Key'=>$key],
1193+
'Key'=>$src_key],
11941194
$options=['PartSize'=>1024 * 1024 + 1]);
11951195

11961196
$rt = $this->cosClient->getObject(['Bucket'=>$this->bucket, 'Key'=>$dst_key]);

0 commit comments

Comments
 (0)