Nelmio\Alice\FixtureBuilder\Denormalizer\Fixture\SpecificationBagDenormalizer\Constructor\ConstructorWithCallerDenormalizerTest::testDenormalizesEmptyConstructorAsSimpleConstructor PHP Метод

testDenormalizesEmptyConstructorAsSimpleConstructor() публичный Метод

    public function testDenormalizesEmptyConstructorAsSimpleConstructor()
    {
        $constructor = [];
        $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', []);
        $denormalizer = new ConstructorWithCallerDenormalizer(new SimpleConstructorDenormalizer($argumentsDenormalizer));
        $actual = $denormalizer->denormalize($fixture, $flagParser, $constructor);
        $this->assertEquals($expected, $actual);
    }