Skip to content

Commit 3c765c9

Browse files
Add two tests for the '*' serialization group
1 parent 370f2c6 commit 3c765c9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ public function testGetAllowedAttributesAsString()
7272

7373
$result = $this->normalizer->getAllowedAttributes('c', [AbstractNormalizer::GROUPS => ['other']], true);
7474
$this->assertEquals(['a3', 'a4'], $result);
75+
76+
$result = $this->normalizer->getAllowedAttributes('c', [AbstractNormalizer::GROUPS => ['*']], true);
77+
$this->assertEquals(['a1', 'a2', 'a3', 'a4'], $result);
7578
}
7679

7780
public function testGetAllowedAttributesAsObjects()
@@ -104,6 +107,9 @@ public function testGetAllowedAttributesAsObjects()
104107

105108
$result = $this->normalizer->getAllowedAttributes('c', [AbstractNormalizer::GROUPS => ['other']], false);
106109
$this->assertEquals([$a3, $a4], $result);
110+
111+
$result = $this->normalizer->getAllowedAttributes('c', [AbstractNormalizer::GROUPS => ['*']], false);
112+
$this->assertEquals([$a1, $a2, $a3, $a4], $result);
107113
}
108114

109115
public function testObjectWithStaticConstructor()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy