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