public function SerializerTest::testCustomNormalizerCanNormalizeCollectionsAndScalar in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/serializer/Tests/SerializerTest.php \Symfony\Component\Serializer\Tests\SerializerTest::testCustomNormalizerCanNormalizeCollectionsAndScalar()
File
- vendor/
symfony/ serializer/ Tests/ SerializerTest.php, line 87
Class
Namespace
Symfony\Component\Serializer\TestsCode
public function testCustomNormalizerCanNormalizeCollectionsAndScalar() {
$this->serializer = new Serializer(array(
new TestNormalizer(),
), array());
$this
->assertNull($this->serializer
->normalize(array(
'a',
'b',
)));
$this
->assertNull($this->serializer
->normalize(new \ArrayObject(array(
'c',
'd',
))));
$this
->assertNull($this->serializer
->normalize(array()));
$this
->assertNull($this->serializer
->normalize('test'));
}