abstract class ConstraintValidatorTestCase extends TestCase

A test case to ease testing Constraint Validators.

Properties

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

Methods

setUp()

No description

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

at line 52
protected setUp()

at line 74
protected tearDown()

at line 79
protected setDefaultTimezone($defaultTimezone)

Parameters

$defaultTimezone

at line 89
protected restoreDefaultTimezone()

at line 97
protected createContext()

at line 116
protected setGroup($group)

Parameters

$group

at line 122
protected setObject($object)

Parameters

$object

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

Parameters

$object
$property

at line 142
protected setValue($value)

Parameters

$value

at line 148
protected setRoot($root)

Parameters

$root

at line 155
protected setPropertyPath($propertyPath)

Parameters

$propertyPath

at line 161
protected expectNoValidate()

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

Parameters

$i
$propertyPath
$value
$group

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

Parameters

$i
$propertyPath
$value
$constraints
$group

at line 194
protected assertNoViolation()

at line 204
protected ConstraintViolationAssertion buildViolation($message)

Parameters

$message

Return Value

ConstraintViolationAssertion

at line 209
abstract protected createValidator()