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 80
protected setDefaultTimezone($defaultTimezone)

Parameters

$defaultTimezone

at line 90
protected restoreDefaultTimezone()

at line 98
protected createContext()

at line 117
protected setGroup($group)

Parameters

$group

at line 123
protected setObject($object)

Parameters

$object

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

Parameters

$object
$property

at line 143
protected setValue($value)

Parameters

$value

at line 149
protected setRoot($root)

Parameters

$root

at line 156
protected setPropertyPath($propertyPath)

Parameters

$propertyPath

at line 162
protected expectNoValidate()

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

Parameters

$i
$propertyPath
$value
$group

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

Parameters

$i
$propertyPath
$value
$constraints
$group

at line 195
protected assertNoViolation()

at line 205
protected ConstraintViolationAssertion buildViolation($message)

Parameters

$message

Return Value

ConstraintViolationAssertion

at line 210
abstract protected createValidator()