File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
tests/Gaufrette/Functional/Adapter Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ public function rename($sourceKey, $targetKey)
134
134
$ this ->ensureBucketExists ();
135
135
$ options = $ this ->getOptions (
136
136
$ targetKey ,
137
- ['CopySource ' => $ this ->bucket . '/ ' . $ this ->computePath ($ sourceKey )]
137
+ ['CopySource ' => urlencode ( $ this ->bucket . '/ ' . $ this ->computePath ($ sourceKey) )]
138
138
);
139
139
140
140
try {
Original file line number Diff line number Diff line change @@ -188,4 +188,16 @@ public function shouldUploadWithGivenContentType()
188
188
189
189
$ this ->assertEquals ('text/html ' , $ this ->filesystem ->mimeType ('foo ' ));
190
190
}
191
+
192
+ /**
193
+ * @test
194
+ */
195
+ public function shouldRenameAnObject ()
196
+ {
197
+ $ this ->filesystem ->write ('foo ' , '' );
198
+ $ this ->filesystem ->rename ('foo ' , 'foo%_encode ' );
199
+
200
+ $ this ->assertFalse ($ this ->filesystem ->has ('foo ' ));
201
+ $ this ->assertTrue ($ this ->filesystem ->has ('foo%_encode ' ));
202
+ }
191
203
}
You can’t perform that action at this time.
0 commit comments