Skip to content

Commit 31da707

Browse files
committed
fix tests
1 parent 1e2c337 commit 31da707

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Symfony/Component/Serializer/Tests/NameConverter/CamelCaseToSnakeCaseNameConverterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static function attributeProvider()
6161
public function testDenormalizeWithContext()
6262
{
6363
$nameConverter = new CamelCaseToSnakeCaseNameConverter(null, true);
64-
$denormalizedValue = $nameConverter->denormalize('last_name', context: [CamelCaseToSnakeCaseNameConverter::REQUIRE_SNAKE_CASE_PROPERTIES]);
64+
$denormalizedValue = $nameConverter->denormalize('last_name', null, null, [CamelCaseToSnakeCaseNameConverter::REQUIRE_SNAKE_CASE_PROPERTIES]);
6565

6666
$this->assertSame($denormalizedValue, 'lastName');
6767
}
@@ -71,6 +71,6 @@ public function testErrorDenormalizeWithContext()
7171
$nameConverter = new CamelCaseToSnakeCaseNameConverter(null, true);
7272

7373
$this->expectException(UnexpectedPropertyException::class);
74-
$nameConverter->denormalize('lastName', context: [CamelCaseToSnakeCaseNameConverter::REQUIRE_SNAKE_CASE_PROPERTIES => true]);
74+
$nameConverter->denormalize('lastName', null, null, [CamelCaseToSnakeCaseNameConverter::REQUIRE_SNAKE_CASE_PROPERTIES => true]);
7575
}
7676
}

src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,12 @@ public static function getNormalizerWithCustomNameConverter()
272272
{
273273
$extractor = new PhpDocExtractor();
274274
$nameConverter = new class() implements NameConverterInterface {
275-
public function normalize(string $propertyName): string
275+
public function normalize(string $propertyName, ?string $class = null, ?string $format = null, array $context = []): string
276276
{
277277
return ucfirst($propertyName);
278278
}
279279

280-
public function denormalize(string $propertyName): string
280+
public function denormalize(string $propertyName, ?string $class = null, ?string $format = null, array $context = []): string
281281
{
282282
return lcfirst($propertyName);
283283
}

0 commit comments

Comments
 (0)