Skip to content

Commit e67cf42

Browse files
committed
Adjusted pre-existing documentation normalizer tests to new schema dumping
1 parent 44f44de commit e67cf42

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

tests/Swagger/Serializer/DocumentationNormalizerV2Test.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,11 @@ private function doTestNormalize(OperationMethodResolverInterface $operationMeth
343343
'description' => 'This is an initializable but not writable property.',
344344
]),
345345
'dummyDate' => new \ArrayObject([
346-
'type' => 'string',
346+
'type' => ['string', 'null'],
347347
'description' => 'This is a \DateTimeInterface object.',
348348
'format' => 'date-time',
349-
]), ],
349+
]),
350+
],
350351
]),
351352
]),
352353
];
@@ -2018,7 +2019,10 @@ public function testNormalizeWithNestedNormalizationGroups(): void
20182019
]),
20192020
'relatedDummy' => new \ArrayObject([
20202021
'description' => 'This is a related dummy \o/.',
2021-
'$ref' => '#/definitions/'.$relatedDummyRef,
2022+
'oneOf' => [
2023+
['type' => 'null'],
2024+
['$ref' => '#/definitions/'.$relatedDummyRef],
2025+
],
20222026
]),
20232027
],
20242028
]),

tests/Swagger/Serializer/DocumentationNormalizerV3Test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ private function doTestNormalize(OperationMethodResolverInterface $operationMeth
385385
'description' => 'This is an initializable but not writable property.',
386386
]),
387387
'dummyDate' => new \ArrayObject([
388-
'type' => 'string',
388+
'type' => ['string', 'null'],
389389
'description' => 'This is a \DateTimeInterface object.',
390390
'format' => 'date-time',
391391
]),

0 commit comments

Comments
 (0)