public function SerializerTest::testDenormalizeOnNormalizer

@expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException

File

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

Class

SerializerTest

Namespace

Symfony\Component\Serializer\Tests

Code

public function testDenormalizeOnNormalizer() {
  $this->serializer = new Serializer(array(
    new TestNormalizer(),
  ), array());
  $data = array(
    'title' => 'foo',
    'numbers' => array(
      5,
      3,
    ),
  );
  $this
    ->assertTrue($this->serializer
    ->denormalize(json_encode($data), 'stdClass', 'json'));
}