@@ -115,7 +115,7 @@ public function testHandleTestChunk()
115115
116116 $ this ->response ->expects ($ this ->once ())
117117 ->method ('header ' )
118- ->with ($ this ->equalTo (200 ));
118+ ->with ($ this ->equalTo (201 ));
119119
120120 $ this ->resumbable = new Resumable ($ this ->request ,$ this ->response );
121121 $ this ->resumbable ->tempFolder = 'test/tmp ' ;
@@ -184,22 +184,25 @@ public function testResumableParamsGetRequest()
184184
185185 public static function isFileUploadCompleteProvider ()
186186 {
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+ ];
192195 }
193196
194197 /**
195198 *
196199 * @dataProvider isFileUploadCompleteProvider
197200 */
198- public function testIsFileUploadComplete ($ filename ,$ identifier , $ chunkSize , $ totalSize , $ expected )
201+ public function testIsFileUploadComplete ($ filename ,$ identifier , $ totalChunks , $ expected )
199202 {
200203 $ this ->resumbable = new Resumable ($ this ->request ,$ this ->response );
201204 $ 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 ));
203206 }
204207
205208 public function testIsChunkUploaded ()
0 commit comments