@@ -115,7 +115,7 @@ public function testHandleTestChunk()
115
115
116
116
$ this ->response ->expects ($ this ->once ())
117
117
->method ('header ' )
118
- ->with ($ this ->equalTo (200 ));
118
+ ->with ($ this ->equalTo (201 ));
119
119
120
120
$ this ->resumbable = new Resumable ($ this ->request ,$ this ->response );
121
121
$ this ->resumbable ->tempFolder = 'test/tmp ' ;
@@ -184,22 +184,25 @@ public function testResumableParamsGetRequest()
184
184
185
185
public static function isFileUploadCompleteProvider ()
186
186
{
187
- return array (
188
- array ('mock.png ' , 'files ' , 20 , 60 , true ),
189
- array ('mock.png ' ,'files ' , 25 , 60 , true ),
190
- array ('mock.png ' ,'files ' , 10 , 60 , false ),
191
- );
187
+ return [
188
+ ['mock.png ' , 'files ' , 1 , true ],// test/files/0001-0003 exist
189
+ ['mock.png ' , 'files ' , 2 , true ],// test/files/0001-0003 exist
190
+ ['mock.png ' , 'files ' , 3 , true ],// test/files/0001-0003 exist
191
+ ['mock.png ' , 'files ' , 4 , false ],// no 0004 chunk
192
+ ['mock.png ' , 'files ' , 5 , false ],// no 0004-0005 chunks
193
+ ['mock.png ' , 'files ' , 15 , false ],// no 0004-00015 chunks
194
+ ];
192
195
}
193
196
194
197
/**
195
198
*
196
199
* @dataProvider isFileUploadCompleteProvider
197
200
*/
198
- public function testIsFileUploadComplete ($ filename ,$ identifier , $ chunkSize , $ totalSize , $ expected )
201
+ public function testIsFileUploadComplete ($ filename ,$ identifier , $ totalChunks , $ expected )
199
202
{
200
203
$ this ->resumbable = new Resumable ($ this ->request ,$ this ->response );
201
204
$ this ->resumbable ->tempFolder ='test ' ;
202
- $ this ->assertEquals ($ expected , $ this ->resumbable ->isFileUploadComplete ($ filename , $ identifier , $ chunkSize , $ totalSize ));
205
+ $ this ->assertEquals ($ expected , $ this ->resumbable ->isFileUploadComplete ($ filename , $ identifier , $ totalChunks ));
203
206
}
204
207
205
208
public function testIsChunkUploaded ()
0 commit comments