You are here

public function RegexTest::testGetCustomHtmlPattern in Plug 7

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/RegexTest.php, line 77

Class

RegexTest
@author Bernhard Schussek <bschussek@gmail.com>

Namespace

Constraints

Code

public function testGetCustomHtmlPattern() {
  $constraint = new Regex(array(
    'pattern' => '((?![0-9]$|[a-z]+).)*',
    'htmlPattern' => 'foobar',
  ));
  $this
    ->assertSame('((?![0-9]$|[a-z]+).)*', $constraint->pattern);
  $this
    ->assertSame('foobar', $constraint
    ->getHtmlPattern());
}