Skip to content

Commit 215fab2

Browse files
AsyncS3: Test copying an object with non-ASCII characters in its name
1 parent f7cbcf1 commit 215fab2

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

src/AsyncAwsS3/AsyncAwsS3AdapterTest.php

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ public function copying_a_file_with_visibility(): void
374374
$adapter->write(
375375
'source.txt',
376376
'contents to be copied',
377-
new Config([Config::OPTION_VISIBILITY => Visibility::PUBLIC])
377+
new Config()
378378
);
379379

380380
$adapter->copy('source.txt', 'destination.txt', new Config([Config::OPTION_VISIBILITY => Visibility::PRIVATE]));
@@ -386,6 +386,27 @@ public function copying_a_file_with_visibility(): void
386386
});
387387
}
388388

389+
/**
390+
* @test
391+
*/
392+
public function copying_a_file_with_non_ascii_characters(): void
393+
{
394+
$this->runScenario(function () {
395+
$adapter = $this->adapter();
396+
$adapter->write(
397+
'ıÇöü🤔.txt',
398+
'contents to be copied',
399+
new Config([Config::OPTION_VISIBILITY => Visibility::PUBLIC])
400+
);
401+
402+
$adapter->copy('ıÇöü🤔.txt', 'ıÇöü🤔_copy.txt', new Config());
403+
404+
$this->assertTrue($adapter->fileExists('ıÇöü🤔.txt'));
405+
$this->assertTrue($adapter->fileExists('ıÇöü🤔_copy.txt'));
406+
$this->assertEquals('contents to be copied', $adapter->read('ıÇöü🤔_copy.txt'));
407+
});
408+
}
409+
389410
/**
390411
* @test
391412
*/

0 commit comments

Comments
 (0)