Nelmio\Alice\Generator\Resolver\Value\Chainable\DynamicArrayValueResolverTest::testThrowsExceptionIfAnInvalidQuantifierIsGiven PHP Method

testThrowsExceptionIfAnInvalidQuantifierIsGiven() public method

    public function testThrowsExceptionIfAnInvalidQuantifierIsGiven()
    {
        $quantifier = new FakeValue();
        $value = new DynamicArrayValue($quantifier, '');
        $fixture = new DummyFixture('dummy');
        $set = ResolvedFixtureSetFactory::create();
        $scope = ['injected' => true];
        $context = new GenerationContext();
        $context->markIsResolvingFixture('bar');
        $decoratedResolverProphecy = $this->prophesize(ValueResolverInterface::class);
        $decoratedResolverProphecy->resolve($quantifier, $fixture, $set, $scope, $context)->willReturn(new ResolvedValueWithFixtureSet(-1, ResolvedFixtureSetFactory::create(new ParameterBag(['foo' => 'bar']))));
        /** @var ValueResolverInterface $decoratedResolver */
        $decoratedResolver = $decoratedResolverProphecy->reveal();
        $resolver = new DynamicArrayValueResolver($decoratedResolver);
        $resolver->resolve($value, $fixture, $set, $scope, $context);
        $decoratedResolverProphecy->resolve(Argument::cetera())->shouldHaveBeenCalledTimes(1);
    }