abstract class ConstraintValidatorTestCase extends TestCase

A test case to ease testing Constraint Validators.

Traits

Properties

protected ExecutionContextInterface $context
protected ConstraintValidatorInterface $validator
protected $group
protected $metadata
protected $object
protected $value
protected $root
protected $propertyPath
protected $constraint
protected $defaultTimezone

Methods

void
setUp()

No description

void
tearDown()

No description

setDefaultTimezone($defaultTimezone)

No description

restoreDefaultTimezone()

No description

createContext()

No description

setGroup($group)

No description

setObject($object)

No description

setProperty($object, $property)

No description

setValue($value)

No description

setRoot($root)

No description

setPropertyPath($propertyPath)

No description

expectNoValidate()

No description

expectValidateAt($i, $propertyPath, $value, $group)

No description

expectValidateValueAt($i, $propertyPath, $value, $constraints, $group = null)

No description

assertNoViolation()

No description

buildViolation($message)

No description

createValidator()

No description

Details

protected void setUp()

Return Value

void

protected void tearDown()

Return Value

void

at line 81
protected setDefaultTimezone($defaultTimezone)

Parameters

$defaultTimezone

at line 91
protected restoreDefaultTimezone()

at line 99
protected createContext()

at line 118
protected setGroup($group)

Parameters

$group

at line 124
protected setObject($object)

Parameters

$object

at line 134
protected setProperty($object, $property)

Parameters

$object
$property

at line 144
protected setValue($value)

Parameters

$value

at line 150
protected setRoot($root)

Parameters

$root

at line 157
protected setPropertyPath($propertyPath)

Parameters

$propertyPath

at line 163
protected expectNoValidate()

at line 172
protected expectValidateAt($i, $propertyPath, $value, $group)

Parameters

$i
$propertyPath
$value
$group

at line 184
protected expectValidateValueAt($i, $propertyPath, $value, $constraints, $group = null)

Parameters

$i
$propertyPath
$value
$constraints
$group

at line 196
protected assertNoViolation()

at line 206
protected ConstraintViolationAssertion buildViolation($message)

Parameters

$message

Return Value

ConstraintViolationAssertion

at line 211
abstract protected createValidator()