/**
* @author Eduard Bulava <bulavaeduard@gmail.com>
*/
class UnwrappinDenormalizerTest extends TestCase
{ private UnwrappingDenormalizer
$denormalizer;
private MockObject&Serializer
$serializer;
protected function setUp(): void
{ $this->serializer =
$this->
createMock(Serializer::
class);
$this->denormalizer =
new UnwrappingDenormalizer();
$this->denormalizer->
setSerializer($this->serializer
);
} public function testSupportsNormalization() { $this->
assertTrue($this->denormalizer->
supportsDenormalization([], 'stdClass', 'any',
[UnwrappingDenormalizer::UNWRAP_PATH => '[baz][inner]'
]));
$this->
assertFalse($this->denormalizer->
supportsDenormalization([], 'stdClass', 'any',
[UnwrappingDenormalizer::UNWRAP_PATH => '[baz][inner]', 'unwrapped' => true
]));
$this->
assertFalse($this->denormalizer->
supportsDenormalization([], 'stdClass', 'any',
[]));
} public function testDenormalize() {