resolve() public method

public resolve ( Nelmio\Alice\Definition\ValueInterface $value, Nelmio\Alice\FixtureInterface $fixture, ResolvedFixtureSet $fixtureSet, array $scope, GenerationContext $context ) : ResolvedValueWithFixtureSet
$value Nelmio\Alice\Definition\ValueInterface
$fixture Nelmio\Alice\FixtureInterface
$fixtureSet Nelmio\Alice\Generator\ResolvedFixtureSet
$scope array
$context Nelmio\Alice\Generator\GenerationContext
return Nelmio\Alice\Generator\ResolvedValueWithFixtureSet
 public function testThrowsAnExceptionIfResolvedReferenceHasNoSuchProperty()
 {
     try {
         $value = new FixturePropertyValue($reference = new FakeValue(), $property = 'prop');
         $instance = new \stdClass();
         $instance->prop = 'foo';
         $set = ResolvedFixtureSetFactory::create();
         $valueResolverProphecy = $this->prophesize(ValueResolverInterface::class);
         $valueResolverProphecy->resolve(Argument::cetera())->willReturn(new ResolvedValueWithFixtureSet(new \stdClass(), $set));
         /** @var ValueResolverInterface $valueResolver */
         $valueResolver = $valueResolverProphecy->reveal();
         $resolver = new FixturePropertyReferenceResolver(PropertyAccess::createPropertyAccessor(), $valueResolver);
         $resolver->resolve($value, new SimpleFixture('dummy', 'Dummy', SpecificationBagFactory::create()), $set, [], new GenerationContext());
         $this->fail('Expected exception to be thrown.');
     } catch (NoSuchPropertyException $exception) {
         $this->assertEquals('Could not find the property "prop" of the object "dummy" (class: Dummy).', $exception->getMessage());
         $this->assertEquals(0, $exception->getCode());
         $this->assertNotNull($exception->getPrevious());
     }
 }