public function SerializerTest::testDecode

File

drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/SerializerTest.php, line 175

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);
}