Nelmio\Alice\FixtureInterface::getSpecs PHP Method

getSpecs() public method

public getSpecs ( ) : SpecificationBag
return Nelmio\Alice\Definition\SpecificationBag
    public function getSpecs() : SpecificationBag;

Usage Example

Exemplo n.º 1
0
 /**
  * @param FixtureInterface   $fixture
  * @param ResolvedFixtureSet $set
  * @param GenerationContext  $context
  *
  * @throws UnresolvableValueDuringGenerationException
  *
  * @return array
  */
 private function resolveFixtureConstructor(FixtureInterface $fixture, ResolvedFixtureSet $set, GenerationContext $context) : array
 {
     $specs = $fixture->getSpecs();
     $constructor = $specs->getConstructor();
     if (null === $constructor || $constructor instanceof NoMethodCall) {
         return [$fixture, $set];
     }
     if (null === $this->valueResolver) {
         throw ResolverNotFoundExceptionFactory::createUnexpectedCall(__METHOD__);
     }
     list($resolvedArguments, $set) = $this->resolveArguments($constructor->getArguments(), $this->valueResolver, $fixture, $set, $context);
     return [$fixture->withSpecs($specs->withConstructor($constructor->withArguments($resolvedArguments))), $set];
 }
All Usage Examples Of Nelmio\Alice\FixtureInterface::getSpecs