Fixes MimeTypeTest Expected Exception Path

Previously, the MimeTypeTest was matching UNIX-style file slashes
in its PHPUnit Expected Exception. This change fixes it to
ignore the slash and match only the file name and pass on Windows
platforms as well.
This commit is contained in:
Alexandre Gaigalas 2015-10-17 11:14:38 -03:00
parent 60568eac62
commit a0e4cfa1e2

View file

@ -95,9 +95,9 @@ class MimetypeTest extends PHPUnit_Framework_TestCase
/**
* @expectedException Respect\Validation\Exceptions\MimetypeException
* @expectedExceptionMessageRegExp #".+/MimetypeTest.php" must have "application.?/json" mimetype#
* @expectedExceptionMessageRegExp #".+MimetypeTest.php" must have "application.?/json" mimetype#
*/
public function testShouldThowsMimetypeExceptionWhenCheckingValue()
public function testShouldThrowMimetypeExceptionWhenCheckingValue()
{
$rule = new Mimetype('application/json');
$rule->check(__FILE__);