@@ -136,6 +136,7 @@ public function testHas()
136
136
$ name = 'test-has.txt ' ;
137
137
self ::$ upyun ->write ($ name , 'test file content 4 ' );
138
138
$ this ->assertEquals (self ::$ upyun ->has ($ name ), true );
139
+ sleep (5 );
139
140
self ::$ upyun ->delete ($ name );
140
141
sleep (5 );
141
142
$ this ->assertEquals (self ::$ upyun ->has ($ name ), false );
@@ -204,6 +205,33 @@ public function testUsage()
204
205
$ this ->assertTrue ($ size > 0 );
205
206
}
206
207
208
+ /**
209
+ * @depends testWriteString
210
+ */
211
+ public function testCopy ()
212
+ {
213
+ $ source = 'test-copy.txt ' ;
214
+ $ target = 'test-copy-target.txt ' ;
215
+ self ::$ upyun ->write ($ source , 'test file content 6 ' );
216
+ sleep (5 );
217
+ self ::$ upyun ->copy ($ source , $ target );
218
+ $ this ->assertEquals (self ::$ upyun ->has ($ target ), true );
219
+ }
220
+
221
+ /**
222
+ * @depends testWriteString
223
+ */
224
+ public function testMove ()
225
+ {
226
+ $ source = 'test-move.txt ' ;
227
+ $ target = 'test-move-target.txt ' ;
228
+ self ::$ upyun ->write ($ source , 'test file content 7 ' );
229
+ sleep (5 );
230
+ self ::$ upyun ->move ($ source , $ target );
231
+ $ this ->assertEquals (self ::$ upyun ->has ($ source ), false );
232
+ $ this ->assertEquals (self ::$ upyun ->has ($ target ), true );
233
+ }
234
+
207
235
public function testPurge ()
208
236
{
209
237
$ urls = self ::$ upyun ->purge (getFileUrl ('test.txt ' ));
@@ -265,6 +293,7 @@ public function testAvMeta()
265
293
266
294
public function testSnapshot ()
267
295
{
296
+ sleep (5 );
268
297
$ source = 'php-sdk-sample.mp4 ' ;
269
298
self ::$ upyun ->write ($ source , fopen (__DIR__ . '/assets/SampleVideo_640x360_1mb.mp4 ' , 'r ' ));
270
299
$ result = self ::$ upyun ->snapshot ('/php-sdk-sample.mp4 ' , '/snapshot.jpg ' , '00:00:01 ' , '720x480 ' , 'jpg ' );
0 commit comments