use Symfony\Component\Validator\Exception\InvalidArgumentException;
use Symfony\Component\Validator\Mapping\ClassMetadata;
use Symfony\Component\Validator\Mapping\Loader\AttributeLoader;
/**
* @author Bernhard Schussek <bschussek@gmail.com>
*/
class RegexTest extends TestCase
{ public function testConstraintGetDefaultOption() { $constraint =
new Regex('/^[0-9]+$/'
);
$this->
assertSame('/^[0-9]+$/',
$constraint->pattern
);
} public static function provideHtmlPatterns() { return [ // HTML5 wraps the pattern in ^(?:pattern)$
['/^[0-9]+$/', '[0-9]+'
],
['/[0-9]+$/', '.*[0-9]+'
],
['/^[0-9]+/', '[0-9]+.*'
],
[