platform/api/symfony/Component/Validator/Tests/Constraints/TimezoneTest.yaml
2024-09-02 10:44:11 -07:00

59 lines
2.2 KiB
YAML

name: TimezoneTest
class_comment: '# * @author Javier Spagnoletti <phansys@gmail.com>'
dependencies:
- name: TestCase
type: class
source: PHPUnit\Framework\TestCase
- name: Timezone
type: class
source: Symfony\Component\Validator\Constraints\Timezone
- name: ConstraintDefinitionException
type: class
source: Symfony\Component\Validator\Exception\ConstraintDefinitionException
- name: ClassMetadata
type: class
source: Symfony\Component\Validator\Mapping\ClassMetadata
- name: AttributeLoader
type: class
source: Symfony\Component\Validator\Mapping\Loader\AttributeLoader
properties:
- name: a
visibility: private
comment: null
- name: b
visibility: private
comment: null
- name: c
visibility: private
comment: null
methods:
- name: testExceptionForInvalidGroupedTimezones
visibility: public
parameters:
- name: zone
comment: "# * @author Javier Spagnoletti <phansys@gmail.com>\n# */\n# class TimezoneTest\
\ extends TestCase\n# {\n# public function testValidTimezoneConstraints()\n# {\n\
# new Timezone();\n# new Timezone(['zone' => \\DateTimeZone::ALL]);\n# new Timezone(\\\
DateTimeZone::ALL_WITH_BC);\n# new Timezone([\n# 'zone' => \\DateTimeZone::PER_COUNTRY,\n\
# 'countryCode' => 'AR',\n# ]);\n# \n# $this->addToAssertionCount(1);\n# }\n#\
\ \n# public function testExceptionForGroupedTimezonesByCountryWithWrongZone()\n\
# {\n# $this->expectException(ConstraintDefinitionException::class);\n# new Timezone([\n\
# 'zone' => \\DateTimeZone::ALL,\n# 'countryCode' => 'AR',\n# ]);\n# }\n# \n#\
\ public function testExceptionForGroupedTimezonesByCountryWithoutZone()\n# {\n\
# $this->expectException(ConstraintDefinitionException::class);\n# new Timezone(['countryCode'\
\ => 'AR']);\n# }\n# \n# /**\n# * @dataProvider provideInvalidZones"
- name: provideInvalidZones
visibility: public
parameters: []
comment: null
- name: testAttributes
visibility: public
parameters: []
comment: null
traits:
- PHPUnit\Framework\TestCase
- Symfony\Component\Validator\Constraints\Timezone
- Symfony\Component\Validator\Exception\ConstraintDefinitionException
- Symfony\Component\Validator\Mapping\ClassMetadata
- Symfony\Component\Validator\Mapping\Loader\AttributeLoader
interfaces: []