public function validate($input) : bool { return (bool) preg_match($this->regexp, $input); }
/** * @dataProvider providerForFail */ public function testInvalidRegexp($expression, $input) { $v = new Regexp($expression); $this->assertFalse($v->validate($input)); }