Beispiel #1
0
 /**
  * @param ExampleNode            $example
  * @param Specification $context
  * @param MatcherManager         $matchers
  * @param CollaboratorManager    $collaborators
  */
 public function prepare(ExampleNode $example, Specification $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);
 }
Beispiel #2
0
 /**
  * @param MatcherManager           $matchers
  * @param PresenterInterface       $presenter
  * @param EventDispatcherInterface $dispatcher
  * @param ExampleNode              $example
  */
 public function __construct(MatcherManager $matchers, PresenterInterface $presenter, EventDispatcherInterface $dispatcher, ExampleNode $example)
 {
     parent::__construct($matchers, $presenter, $dispatcher, $example);
     $this->matchers = $matchers;
     $this->presenter = $presenter;
     $this->dispatcher = $dispatcher;
     $this->example = $example;
 }
Beispiel #3
0
 /**
  * @param mixed $value
  *
  * @return Subject
  */
 private function wrap($value)
 {
     return $this->wrapper->wrap($value);
 }