PhpSpec\Loader\Node\ExampleNode::getSpecification PHP Method

getSpecification() public method

public getSpecification ( ) : SpecificationNode | null
return SpecificationNode | null
    public function getSpecification()
    {
        return $this->specification;
    }

Usage Example

 /**
  * @param ExampleNode            $example
  * @param SpecificationInterface $context
  * @param MatcherManager         $matchers
  * @param CollaboratorManager    $collaborators
  */
 public function prepare(ExampleNode $example, SpecificationInterface $context, MatcherManager $matchers, CollaboratorManager $collaborators)
 {
     $spec = $example->getSpecification()->getClassReflection()->newInstance();
     $beforeMethod = $example->getSpecification()->getClassReflection()->getMethod($this->beforeMethod);
     $this->createMissingCollabolators($collaborators, $beforeMethod);
     $beforeMethod->invokeArgs($spec, $collaborators->getArgumentsFor($beforeMethod));
 }
All Usage Examples Of PhpSpec\Loader\Node\ExampleNode::getSpecification