You are here

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

File

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

Class

SerializerTest

Namespace

Symfony\Component\Serializer\Tests

Code

public function testNormalizeTraversable() {
  $this->serializer = new Serializer(array(), array(
    'json' => new JsonEncoder(),
  ));
  $result = $this->serializer
    ->serialize(new TraversableDummy(), 'json');
  $this
    ->assertEquals('{"foo":"foo","bar":"bar"}', $result);
}