api/symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorWithPositiveConstraintTest.yaml

88 lines
3.5 KiB
YAML
Raw Normal View History

2024-09-26 09:03:21 +00:00
name: GreaterThanValidatorWithPositiveConstraintTest
class_comment: "# * @author Jan Sch\xE4dlich <jan.schaedlich@sensiolabs.de>"
dependencies:
- name: Constraint
type: class
source: Symfony\Component\Validator\Constraint
- name: AbstractComparison
type: class
source: Symfony\Component\Validator\Constraints\AbstractComparison
- name: Positive
type: class
source: Symfony\Component\Validator\Constraints\Positive
- 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\
\ GreaterThanValidatorWithPositiveConstraintTest extends GreaterThanValidatorTest\n\
# {\n# protected static function createConstraint(?array $options = null): Constraint\n\
# {\n# return new Positive($options);\n# }\n# \n# public static function provideValidComparisons():\
\ array\n# {\n# return [\n# [2, 0],\n# [2.5, 0],\n# ['333', '0'],\n# [null, 0],\n\
# ];\n# }\n# \n# public static function provideInvalidComparisons(): array\n#\
\ {\n# return [\n# [0, '0', 0, '0', 'int'],\n# [-1, '-1', 0, '0', 'int'],\n# [-2,\
\ '-2', 0, '0', 'int'],\n# [-2.5, '-2.5', 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\\Positive\" constraint cannot be set.');\n#\
\ \n# return new Positive(['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\\Positive\" constraint cannot be set.');\n# \n# return\
\ new Positive(['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: testThrowsOnInvalidStringDates
visibility: public
parameters:
- name: constraint
- name: expectedMessage
- name: value
comment: '# * @dataProvider throwsOnInvalidStringDatesProvider'
- name: testInvalidComparisonToPropertyPathAddsPathAsParameter
visibility: public
parameters: []
comment: null
- name: throwsOnInvalidStringDatesProvider
visibility: public
parameters: []
comment: null
- name: provideAllInvalidComparisons
visibility: public
parameters: []
comment: null
- name: provideComparisonsToNullValueAtPropertyPath
visibility: public
parameters: []
comment: null
traits:
- Symfony\Component\Validator\Constraint
- Symfony\Component\Validator\Constraints\AbstractComparison
- Symfony\Component\Validator\Constraints\Positive
- Symfony\Component\Validator\Exception\ConstraintDefinitionException
interfaces: []