public function testCanDenormalizeNonStaticFactoryConstructor()
{
$constructor = ['@nelmio.entity.user_factory::create' => $arguments = ['<latitude()>', '1 (unique)' => '<longitude()>']];
$fixture = new FakeFixture();
$flagParser = new FakeFlagParser();
$argumentsDenormalizerProphecy = $this->prophesize(ArgumentsDenormalizerInterface::class);
$argumentsDenormalizerProphecy->denormalize($fixture, $flagParser, $arguments)->willReturn($arguments);
/** @var ArgumentsDenormalizerInterface $argumentsDenormalizer */
$argumentsDenormalizer = $argumentsDenormalizerProphecy->reveal();
$expected = new MethodCallWithReference(new InstantiatedReference('nelmio.entity.user_factory'), 'create', $arguments);
$denormalizer = new ConstructorWithCallerDenormalizer(new SimpleConstructorDenormalizer($argumentsDenormalizer));
$actual = $denormalizer->denormalize($fixture, $flagParser, $constructor);
$this->assertEquals($expected, $actual);
}