88 lines
3.6 KiB
YAML
88 lines
3.6 KiB
YAML
name: GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest
|
|
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: PositiveOrZero
|
|
type: class
|
|
source: Symfony\Component\Validator\Constraints\PositiveOrZero
|
|
- 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\
|
|
\ GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest extends GreaterThanOrEqualValidatorTest\n\
|
|
# {\n# protected static function createConstraint(?array $options = null): Constraint\n\
|
|
# {\n# return new PositiveOrZero($options);\n# }\n# \n# public static function\
|
|
\ provideValidComparisons(): array\n# {\n# return [\n# [0, 0],\n# [1, 0],\n# [2,\
|
|
\ 0],\n# [2.5, 0],\n# ['0', '0'],\n# ['333', '0'],\n# [null, 0],\n# ];\n# }\n\
|
|
# \n# public static function provideInvalidComparisons(): array\n# {\n# return\
|
|
\ [\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\\\
|
|
PositiveOrZero\" constraint cannot be set.');\n# \n# return new PositiveOrZero(['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\\PositiveOrZero\"\
|
|
\ constraint cannot be set.');\n# \n# return new PositiveOrZero(['value' => 0]);\n\
|
|
# }\n# \n# /**\n# * @dataProvider provideInvalidConstraintOptions"
|
|
- name: testThrowsConstraintExceptionIfBothValueAndPropertyPath
|
|
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: testNoViolationOnNullObjectWithPropertyPath
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- 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\PositiveOrZero
|
|
- Symfony\Component\Validator\Exception\ConstraintDefinitionException
|
|
interfaces: []
|