Skip to content

Commit 1df3a3d

Browse files
minor #61323 [JsonStreamer] fix expected stream to native value transformers (xabbuh)
This PR was merged into the 7.3 branch. Discussion ---------- [JsonStreamer] fix expected stream to native value transformers | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT This was probably a copy-and-paste mistake from the corresponding write test. With PHPUnit < 12.0 this isn't an issue as closure are not considered when testing for equality. This changes with PHPUnit 12 where `sebastian/comparator` 7 is used which also compares closures. Commits ------- 4736edb fix expected stream to native value transformers
2 parents f446f92 + 4736edb commit 1df3a3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/JsonStreamer/Tests/Mapping/Read/AttributePropertyMetadataLoaderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ public function testRetrieveValueTransformer()
4444
$this->assertEquals([
4545
'id' => new PropertyMetadata('id', Type::string(), [], [DivideStringAndCastToIntValueTransformer::class]),
4646
'active' => new PropertyMetadata('active', Type::string(), [], [StringToBooleanValueTransformer::class]),
47-
'name' => new PropertyMetadata('name', Type::string(), [], [\Closure::fromCallable('strtolower')]),
48-
'range' => new PropertyMetadata('range', Type::string(), [], [\Closure::fromCallable(DummyWithValueTransformerAttributes::concatRange(...))]),
47+
'name' => new PropertyMetadata('name', Type::string(), [], [\Closure::fromCallable('strtoupper')]),
48+
'range' => new PropertyMetadata('range', Type::string(), [], [\Closure::fromCallable(DummyWithValueTransformerAttributes::explodeRange(...))]),
4949
], $loader->load(DummyWithValueTransformerAttributes::class));
5050
}
5151

0 commit comments

Comments
 (0)