You are here

public function SerializerTest::testDeserializeNoEncoder 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::testDeserializeNoEncoder()

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

File

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

Class

SerializerTest

Namespace

Symfony\Component\Serializer\Tests

Code

public function testDeserializeNoEncoder() {
  $this->serializer = new Serializer(array(), array());
  $data = array(
    'title' => 'foo',
    'numbers' => array(
      5,
      3,
    ),
  );
  $this->serializer
    ->deserialize(json_encode($data), '\\Symfony\\Component\\Serializer\\Tests\\Model', 'json');
}