diff --git a/src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php index 777fa26693f5..1587392b608e 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php @@ -62,6 +62,12 @@ public function getValidValues() array('0'), array('090909'), array(90909), + array(new class() { + public function __toString() + { + return '090909'; + } + }), ); } @@ -88,6 +94,12 @@ public function getInvalidValues() return array( array('abcd'), array('090foo'), + array(new class() { + public function __toString() + { + return 'abcd'; + } + }), ); } }