You are here

public function SerializerTest::testDecode in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/serializer/Tests/SerializerTest.php \Symfony\Component\Serializer\Tests\SerializerTest::testDecode()

File

vendor/symfony/serializer/Tests/SerializerTest.php, line 216

Class

SerializerTest

Namespace

Symfony\Component\Serializer\Tests

Code

public function testDecode() {
  $this->serializer = new Serializer(array(), array(
    'json' => new JsonEncoder(),
  ));
  $data = array(
    'foo',
    array(
      5,
      3,
    ),
  );
  $result = $this->serializer
    ->decode(json_encode($data), 'json');
  $this
    ->assertEquals($data, $result);
}