86 lines
3.5 KiB
YAML
86 lines
3.5 KiB
YAML
name: LessThanValidatorWithNegativeConstraintTest
|
|
class_comment: "# * @author Jan Sch\xE4dlich <jan.schaedlich@sensiolabs.de>"
|
|
dependencies:
|
|
- name: Constraint
|
|
type: class
|
|
source: Symfony\Component\Validator\Constraint
|
|
- name: Negative
|
|
type: class
|
|
source: Symfony\Component\Validator\Constraints\Negative
|
|
- name: ConstraintDefinitionException
|
|
type: class
|
|
source: Symfony\Component\Validator\Exception\ConstraintDefinitionException
|
|
properties: []
|
|
methods:
|
|
- name: testThrowsConstraintExceptionIfNoValueOrPropertyPath
|
|
visibility: public
|
|
parameters:
|
|
- name: options
|
|
comment: "# * @author Jan Sch\xE4dlich <jan.schaedlich@sensiolabs.de>\n# */\n# class\
|
|
\ LessThanValidatorWithNegativeConstraintTest extends LessThanValidatorTest\n\
|
|
# {\n# protected static function createConstraint(?array $options = null): Constraint\n\
|
|
# {\n# return new Negative($options);\n# }\n# \n# public static function provideValidComparisons():\
|
|
\ array\n# {\n# return [\n# [-1, 0],\n# [-2, 0],\n# [-2.5, 0],\n# [null, 0],\n\
|
|
# ];\n# }\n# \n# public static function provideInvalidComparisons(): array\n#\
|
|
\ {\n# return [\n# [0, '0', 0, '0', 'int'],\n# [2, '2', 0, '0', 'int'],\n# [2.5,\
|
|
\ '2.5', 0, '0', 'int'],\n# [333, '333', 0, '0', 'int'],\n# ];\n# }\n# \n# public\
|
|
\ function testThrowsConstraintExceptionIfPropertyPath()\n# {\n# $this->expectException(ConstraintDefinitionException::class);\n\
|
|
# $this->expectExceptionMessage('The \"propertyPath\" option of the \"Symfony\\\
|
|
Component\\Validator\\Constraints\\Negative\" constraint cannot be set.');\n#\
|
|
\ \n# return new Negative(['propertyPath' => 'field']);\n# }\n# \n# public function\
|
|
\ testThrowsConstraintExceptionIfValue()\n# {\n# $this->expectException(ConstraintDefinitionException::class);\n\
|
|
# $this->expectExceptionMessage('The \"value\" option of the \"Symfony\\Component\\\
|
|
Validator\\Constraints\\Negative\" constraint cannot be set.');\n# \n# return\
|
|
\ new Negative(['value' => 0]);\n# }\n# \n# /**\n# * @dataProvider provideInvalidConstraintOptions"
|
|
- name: testThrowsConstraintExceptionIfBothValueAndPropertyPath
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testNoViolationOnNullObjectWithPropertyPath
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testInvalidValuePath
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: provideAllValidComparisons
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testValidComparisonToPropertyPath
|
|
visibility: public
|
|
parameters:
|
|
- name: comparedValue
|
|
comment: '# * @dataProvider provideValidComparisonsToPropertyPath'
|
|
- name: throwsOnInvalidStringDatesProvider
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testCompareWithNullValueAtPropertyAt
|
|
visibility: public
|
|
parameters:
|
|
- name: dirtyValue
|
|
- name: dirtyValueAsString
|
|
- name: isValid
|
|
comment: '# * @dataProvider provideComparisonsToNullValueAtPropertyPath'
|
|
- name: testCompareWithUninitializedPropertyAtPropertyPath
|
|
visibility: public
|
|
parameters:
|
|
- name: dirtyValue
|
|
- name: dirtyValueAsString
|
|
- name: isValid
|
|
comment: '# * @dataProvider provideComparisonsToNullValueAtPropertyPath'
|
|
- name: testInvalidComparisonToPropertyPathAddsPathAsParameter
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: provideAllInvalidComparisons
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
traits:
|
|
- Symfony\Component\Validator\Constraint
|
|
- Symfony\Component\Validator\Constraints\Negative
|
|
- Symfony\Component\Validator\Exception\ConstraintDefinitionException
|
|
interfaces: []
|