/** * @param ExampleNode $example * @param SpecificationInterface $context * @param MatcherManager $matchers * @param CollaboratorManager $collaborators */ public function prepare(ExampleNode $example, SpecificationInterface $context, MatcherManager $matchers, CollaboratorManager $collaborators) { $subjectFactory = new Wrapper($matchers, $this->presenter, $this->dispatcher, $example, $this->accessInspector); $subject = $subjectFactory->wrap(null); $subject->beAnInstanceOf($example->getSpecification()->getResource()->getSrcClassname()); $context->setSpecificationSubject($subject); }