@@ -32,15 +32,17 @@ public function basicBehaviorDataProvider()
3232 'type ' => 'image/jpeg ' ,
3333 ];
3434
35+ $ falseTypeMessage = [ExcludeMimeType::FALSE_TYPE => "File has an incorrect mimetype of 'image/jpeg' " ];
36+
3537 return [
3638 // Options, isValid Param, Expected value, messages
37- ['image/gif ' , $ fileUpload , true ],
38- ['image ' , $ fileUpload , false , [ExcludeMimeType:: FALSE_TYPE => " File has an incorrect mimetype of 'image/jpeg' " ] ],
39- ['test/notype ' , $ fileUpload , true ],
40- ['image/gif, image/jpeg ' , $ fileUpload , false , [ExcludeMimeType:: FALSE_TYPE => " File has an incorrect mimetype of 'image/jpeg' " ] ],
41- [['image/vasa ' , 'image/gif ' ], $ fileUpload , true ],
42- [['image/gif ' , 'jpeg ' ], $ fileUpload , false , [ExcludeMimeType:: FALSE_TYPE => " File has an incorrect mimetype of 'image/jpeg' " ] ],
43- [['image/gif ' , 'gif ' ], $ fileUpload , true ],
39+ ['image/gif ' , $ fileUpload , true , [] ],
40+ ['image ' , $ fileUpload , false , $ falseTypeMessage ],
41+ ['test/notype ' , $ fileUpload , true , [] ],
42+ ['image/gif, image/jpeg ' , $ fileUpload , false , $ falseTypeMessage ],
43+ [['image/vasa ' , 'image/gif ' ], $ fileUpload , true , [] ],
44+ [['image/gif ' , 'jpeg ' ], $ fileUpload , false , $ falseTypeMessage ],
45+ [['image/gif ' , 'gif ' ], $ fileUpload , true , [] ],
4446 ];
4547 }
4648
@@ -54,7 +56,7 @@ public function basicBehaviorDataProvider()
5456 * @param bool $expected
5557 * @param array $messages
5658 */
57- public function testBasic ($ options , array $ isValidParam , $ expected , array $ messages = [] )
59+ public function testBasic ($ options , array $ isValidParam , $ expected , array $ messages )
5860 {
5961 $ validator = new ExcludeMimeType ($ options );
6062 $ validator ->enableHeaderCheck ();
0 commit comments