Symfony\Component\Serializer\Tests\Normalizer\ObjectNormalizerTest::testNormalize PHP Method

testNormalize() public method

public testNormalize ( )
    public function testNormalize()
    {
        $obj = new ObjectDummy();
        $object = new \stdClass();
        $obj->setFoo('foo');
        $obj->bar = 'bar';
        $obj->setBaz(true);
        $obj->setCamelCase('camelcase');
        $obj->setObject($object);
        $this->serializer->expects($this->once())->method('normalize')->with($object, 'any')->will($this->returnValue('string_object'));
        $this->assertEquals(array('foo' => 'foo', 'bar' => 'bar', 'baz' => true, 'fooBar' => 'foobar', 'camelCase' => 'camelcase', 'object' => 'string_object'), $this->normalizer->normalize($obj, 'any'));
    }