Nelmio\Alice\Generator\Resolver\Value\Chainable\FunctionCallArgumentResolverTest::testThrowsAnExceptionIfDoesNotHaveAnArgumentResolver PHP Method

testThrowsAnExceptionIfDoesNotHaveAnArgumentResolver() public method

    public function testThrowsAnExceptionIfDoesNotHaveAnArgumentResolver()
    {
        $value = new FunctionCallValue('foo');
        $fixture = new FakeFixture();
        $set = ResolvedFixtureSetFactory::create();
        $scope = ['val' => 'scopie'];
        $context = new GenerationContext();
        $resolver = new FunctionCallArgumentResolver(new FakeValueResolver());
        try {
            $resolver->resolve($value, $fixture, $set, $scope, $context);
            $this->fail('Expected exception to be thrown.');
        } catch (ResolverNotFoundException $exception) {
            $this->assertEquals('Expected method "Nelmio\\Alice\\Generator\\Resolver\\Value\\Chainable\\FunctionCallArgumentResolver::resolve"' . ' to be called only if it has a resolver.', $exception->getMessage());
            $this->assertEquals(0, $exception->getCode());
            $this->assertNull($exception->getPrevious());
        }
    }