You are here

public function UuidValidatorTest::testInvalidNonStrictUuids in Plug 7

@dataProvider getInvalidNonStrictUuids

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php, line 184

Class

UuidValidatorTest
@author Colin O'Dell <colinodell@gmail.com>

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testInvalidNonStrictUuids($uuid, $code) {
  $constraint = new Uuid(array(
    'strict' => false,
    'message' => 'myMessage',
  ));
  $this->validator
    ->validate($uuid, $constraint);
  $this
    ->buildViolation('myMessage')
    ->setParameter('{{ value }}', '"' . $uuid . '"')
    ->setCode($code)
    ->assertRaised();
}