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