You are here

public function UuidValidatorTest::testInvalidNonStrictUuids in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/validator/Tests/Constraints/UuidValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\UuidValidatorTest::testInvalidNonStrictUuids()

@dataProvider getInvalidNonStrictUuids

File

vendor/symfony/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();
}