public function SerializerTest::testNormalizeGivesPriorityToInterfaceOverTraversable in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/serializer/Tests/SerializerTest.php \Symfony\Component\Serializer\Tests\SerializerTest::testNormalizeGivesPriorityToInterfaceOverTraversable()
File
- vendor/
symfony/ serializer/ Tests/ SerializerTest.php, line 52
Class
Namespace
Symfony\Component\Serializer\TestsCode
public function testNormalizeGivesPriorityToInterfaceOverTraversable() {
$this->serializer = new Serializer(array(
new CustomNormalizer(),
), array(
'json' => new JsonEncoder(),
));
$result = $this->serializer
->serialize(new NormalizableTraversableDummy(), 'json');
$this
->assertEquals('{"foo":"normalizedFoo","bar":"normalizedBar"}', $result);
}