Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 151955a

Browse files
committed
Incorporated feedback from @Maks3w
1 parent 01e455c commit 151955a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

test/File/ExcludeMimeTypeTest.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)