You are here

public function BlankValidatorTest::testInvalidValues in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Tests/Constraints/BlankValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\BlankValidatorTest::testInvalidValues()

@dataProvider getInvalidValues

File

vendor/symfony/validator/Tests/Constraints/BlankValidatorTest.php, line 47

Class

BlankValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testInvalidValues($value, $valueAsString) {
  $constraint = new Blank(array(
    'message' => 'myMessage',
  ));
  $this->validator
    ->validate($value, $constraint);
  $this
    ->buildViolation('myMessage')
    ->setParameter('{{ value }}', $valueAsString)
    ->assertRaised();
}