Exemple #1
0
 /**
  * @inheritdoc
  */
 public function generate(FixtureSet $fixtureSet) : ObjectSet
 {
     $resolvedFixtureSet = $this->resolver->resolve($fixtureSet);
     $context = new GenerationContext();
     $resolvedFixtureSet = $this->generateFixtures($resolvedFixtureSet, $context);
     $context->setToSecondPass();
     $resolvedFixtureSet = $this->generateFixtures($resolvedFixtureSet, $context);
     return new ObjectSet($resolvedFixtureSet->getParameters(), $resolvedFixtureSet->getObjects());
 }
 /**
  * @inheritdoc
  */
 public function resolve(FixtureSet $unresolvedFixtureSet) : ResolvedFixtureSet
 {
     $resolvedFixtureSet = $this->resolver->resolve($unresolvedFixtureSet);
     $fixtures = $resolvedFixtureSet->getFixtures();
     $objects = $resolvedFixtureSet->getObjects();
     foreach ($fixtures as $fixture) {
         if ($objects->has($fixture)) {
             $objects = $objects->without($fixture);
         }
     }
     return $resolvedFixtureSet->withObjects($objects);
 }