Skip to content

Commit

Permalink
[Validator] Add tests in regex validator for objects with __toString …
Browse files Browse the repository at this point in the history
…method
  • Loading branch information
raulfraile committed Dec 8, 2018
1 parent c38a79c commit 11e0df4
Showing 1 changed file with 12 additions and 0 deletions.
Expand Up @@ -62,6 +62,12 @@ public function getValidValues()
array('0'),
array('090909'),
array(90909),
array(new class() {
public function __toString()
{
return '090909';
}
}),
);
}

Expand All @@ -88,6 +94,12 @@ public function getInvalidValues()
return array(
array('abcd'),
array('090foo'),
array(new class() {
public function __toString()
{
return 'abcd';
}
}),
);
}
}

0 comments on commit 11e0df4

Please sign in to comment.