Skip to content

Commit

Permalink
Added test for mimetype wildcard
Browse files Browse the repository at this point in the history
  • Loading branch information
kekenec authored Mar 8, 2017
1 parent 40b99d4 commit 3e91f0f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/Validation/ValidationValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1976,8 +1976,12 @@ public function testValidateMimetypes()

$file = $this->getMockBuilder('Symfony\Component\HttpFoundation\File\UploadedFile')->setMethods(['guessExtension'])->setConstructorArgs($uploadedFile)->getMock();
$file->expects($this->any())->method('guessExtension')->will($this->returnValue('php'));

$v = new Validator($trans, ['x' => $file], ['x' => 'mimetypes:text/x-php']);
$this->assertTrue($v->passes());

$v = new Validator($trans, ['x' => $file], ['x' => 'mimetypes:text/*']);
$this->assertTrue($v->passes());
}

public function testValidateMime()
Expand Down

0 comments on commit 3e91f0f

Please sign in to comment.