api/symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.yaml
2024-09-26 02:03:21 -07:00

117 lines
3.9 KiB
YAML

name: UuidValidatorTest
class_comment: '# * @author Colin O''Dell <colinodell@gmail.com>'
dependencies:
- name: Constraint
type: class
source: Symfony\Component\Validator\Constraint
- name: Uuid
type: class
source: Symfony\Component\Validator\Constraints\Uuid
- name: UuidValidator
type: class
source: Symfony\Component\Validator\Constraints\UuidValidator
- name: UnexpectedTypeException
type: class
source: Symfony\Component\Validator\Exception\UnexpectedTypeException
- name: UnexpectedValueException
type: class
source: Symfony\Component\Validator\Exception\UnexpectedValueException
- name: ConstraintValidatorTestCase
type: class
source: Symfony\Component\Validator\Test\ConstraintValidatorTestCase
properties: []
methods:
- name: testValidStrictUuids
visibility: public
parameters:
- name: uuid
- name: versions
default: 'null'
comment: "# * @author Colin O'Dell <colinodell@gmail.com>\n# */\n# class UuidValidatorTest\
\ extends ConstraintValidatorTestCase\n# {\n# protected function createValidator():\
\ UuidValidator\n# {\n# return new UuidValidator();\n# }\n# \n# public function\
\ testNullIsValid()\n# {\n# $this->validator->validate(null, new Uuid());\n# \n\
# $this->assertNoViolation();\n# }\n# \n# public function testEmptyStringIsValid()\n\
# {\n# $this->validator->validate('', new Uuid());\n# \n# $this->assertNoViolation();\n\
# }\n# \n# public function testExpectsUuidConstraintCompatibleType()\n# {\n# $constraint\
\ = $this->createStub(Constraint::class);\n# \n# $this->expectException(UnexpectedTypeException::class);\n\
# \n# $this->validator->validate('216fff40-98d9-11e3-a5e2-0800200c9a66', $constraint);\n\
# }\n# \n# public function testExpectsStringCompatibleType()\n# {\n# $this->expectException(UnexpectedValueException::class);\n\
# $this->validator->validate(new \\stdClass(), new Uuid());\n# }\n# \n# /**\n\
# * @dataProvider getValidStrictUuids"
- name: getValidStrictUuids
visibility: public
parameters: []
comment: null
- name: testValidStrictUuidsWithWhitespaces
visibility: public
parameters:
- name: uuid
- name: versions
default: 'null'
comment: '# * @dataProvider getValidStrictUuidsWithWhitespaces'
- name: getValidStrictUuidsWithWhitespaces
visibility: public
parameters: []
comment: null
- name: testValidStrictUuidWithWhitespacesNamed
visibility: public
parameters: []
comment: null
- name: testInvalidStrictUuids
visibility: public
parameters:
- name: uuid
- name: code
- name: versions
default: 'null'
comment: '# * @dataProvider getInvalidStrictUuids'
- name: getInvalidStrictUuids
visibility: public
parameters: []
comment: null
- name: testValidNonStrictUuids
visibility: public
parameters:
- name: uuid
comment: '# * @dataProvider getValidNonStrictUuids'
- name: getValidNonStrictUuids
visibility: public
parameters: []
comment: null
- name: testInvalidNonStrictUuids
visibility: public
parameters:
- name: uuid
- name: code
comment: '# * @dataProvider getInvalidNonStrictUuids'
- name: getInvalidNonStrictUuids
visibility: public
parameters: []
comment: null
- name: testInvalidNonStrictUuidNamed
visibility: public
parameters: []
comment: null
- name: testTimeBasedUuid
visibility: public
parameters:
- name: uid
- name: expectedTimeBased
comment: '# * @dataProvider getUuidForTimeBasedAssertions'
- name: getUuidForTimeBasedAssertions
visibility: public
parameters: []
comment: null
- name: testAcceptsSingleIntegerAsVersion
visibility: public
parameters: []
comment: null
traits:
- Symfony\Component\Validator\Constraint
- Symfony\Component\Validator\Constraints\Uuid
- Symfony\Component\Validator\Constraints\UuidValidator
- Symfony\Component\Validator\Exception\UnexpectedTypeException
- Symfony\Component\Validator\Exception\UnexpectedValueException
- Symfony\Component\Validator\Test\ConstraintValidatorTestCase
interfaces: []