[Validator] Add tests in regex validator for objects with __toString method

This commit is contained in:
Raul Fraile 2018-12-08 10:21:14 +01:00
parent c38a79cc4f
commit 11e0df4f55
No known key found for this signature in database
GPG Key ID: 29D29519E369380F

View File

@ -62,6 +62,12 @@ class RegexValidatorTest extends ConstraintValidatorTestCase
array('0'),
array('090909'),
array(90909),
array(new class() {
public function __toString()
{
return '090909';
}
}),
);
}
@ -88,6 +94,12 @@ class RegexValidatorTest extends ConstraintValidatorTestCase
return array(
array('abcd'),
array('090foo'),
array(new class() {
public function __toString()
{
return 'abcd';
}
}),
);
}
}