Nelmio\Alice\FixtureBuilder\Denormalizer\Fixture\SpecificationBagDenormalizer\Constructor\ConstructorWithCallerDenormalizerTest::testDenormalizesWithArgumentsConstructorAsSimpleConstructor PHP Method

testDenormalizesWithArgumentsConstructorAsSimpleConstructor() public method

    public function testDenormalizesWithArgumentsConstructorAsSimpleConstructor()
    {
        $constructor = ['0 (unique)' => '<latitude()>', '1 (unique)' => '<longitude()>', '2' => '<random()>', 1000];
        $fixture = new FakeFixture();
        $flagParser = new FakeFlagParser();
        $argumentsDenormalizerProphecy = $this->prophesize(ArgumentsDenormalizerInterface::class);
        $argumentsDenormalizerProphecy->denormalize($fixture, $flagParser, $constructor)->willReturn($constructor);
        /** @var ArgumentsDenormalizerInterface $argumentsDenormalizer */
        $argumentsDenormalizer = $argumentsDenormalizerProphecy->reveal();
        $expected = new SimpleMethodCall('__construct', $constructor);
        $denormalizer = new ConstructorWithCallerDenormalizer(new SimpleConstructorDenormalizer($argumentsDenormalizer));
        $actual = $denormalizer->denormalize($fixture, $flagParser, $constructor);
        $this->assertEquals($expected, $actual);
    }