You are here

protected function AbstractConstraintValidatorTest::createViolation in Zircon Profile 8

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

Parameters

mixed $message:

array $parameters:

string $propertyPath:

string $invalidValue:

null $plural:

null $code:

Return value

ConstraintViolation

Deprecated

to be removed in Symfony 3.0. Use {@link buildViolation()} instead.

File

vendor/symfony/validator/Tests/Constraints/AbstractConstraintValidatorTest.php, line 148

Class

AbstractConstraintValidatorTest
@since 2.5.3

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

protected function createViolation($message, array $parameters = array(), $propertyPath = 'property.path', $invalidValue = 'InvalidValue', $plural = null, $code = null) {
  return new ConstraintViolation(null, $message, $parameters, $this->root, $propertyPath, $invalidValue, $plural, $code, $this->constraint);
}