You are here

public function SerializerTest::testSerializeNoNormalizer in Zircon Profile 8.0

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

@expectedException \Symfony\Component\Serializer\Exception\LogicException

File

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

Class

SerializerTest

Namespace

Symfony\Component\Serializer\Tests

Code

public function testSerializeNoNormalizer() {
  $this->serializer = new Serializer(array(), array(
    'json' => new JsonEncoder(),
  ));
  $data = array(
    'title' => 'foo',
    'numbers' => array(
      5,
      3,
    ),
  );
  $this->serializer
    ->serialize(Model::fromArray($data), 'json');
}