Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  *
  * @param FixtureReferenceValue $value
  *
  * @throws UnresolvableValueException
  */
 public function resolve(ValueInterface $value, FixtureInterface $fixture, ResolvedFixtureSet $fixtureSet, array $scope, GenerationContext $context) : ResolvedValueWithFixtureSet
 {
     if ('self' === $value->getValue()) {
         return new ResolvedValueWithFixtureSet($fixtureSet->getObjects()->get($fixture)->getInstance(), $fixtureSet);
     }
     return $this->decoratedResolver->resolve($value, $fixture, $fixtureSet, $scope, $context);
 }
 /**
  * {@inheritdoc}
  *
  * @param FixtureReferenceValue $value
  *
  * @throws UnresolvableValueException
  */
 public function resolve(ValueInterface $value, FixtureInterface $fixture, ResolvedFixtureSet $fixtureSet, array $scope, GenerationContext $context) : ResolvedValueWithFixtureSet
 {
     if (null === $this->resolver) {
         throw ResolverNotFoundExceptionFactory::createUnexpectedCall(__METHOD__);
     }
     list($referredFixtureId, $fixtureSet) = $this->getReferredFixtureId($this->resolver, $value, $fixture, $fixtureSet, $scope, $context);
     return $this->decoratedResolver->resolve(new FixtureReferenceValue($referredFixtureId), $fixture, $fixtureSet, $scope, $context);
 }