public function SerializerTest::testSerializeArrayOfScalars in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/serializer/Tests/SerializerTest.php \Symfony\Component\Serializer\Tests\SerializerTest::testSerializeArrayOfScalars()
File
- vendor/
symfony/ serializer/ Tests/ SerializerTest.php, line 111
Class
Namespace
Symfony\Component\Serializer\TestsCode
public function testSerializeArrayOfScalars() {
$this->serializer = new Serializer(array(), array(
'json' => new JsonEncoder(),
));
$data = array(
'foo',
array(
5,
3,
),
);
$result = $this->serializer
->serialize($data, 'json');
$this
->assertEquals(json_encode($data), $result);
}