add() public method

public add ( PHPSpec2\Matcher\MatcherInterface $matcher )
$matcher PHPSpec2\Matcher\MatcherInterface
Example #1
0
 protected function createMatchersCollection(Presenter\PresenterInterface $presenter, ArgumentsUnwrapper $unwrapper)
 {
     $matchers = new Matcher\MatchersCollection();
     $matchers->add(new Matcher\IdentityMatcher($presenter));
     $matchers->add(new Matcher\ComparisonMatcher($presenter));
     $matchers->add(new Matcher\ThrowMatcher($unwrapper, $presenter));
     $matchers->add(new Matcher\CountMatcher($presenter));
     $matchers->add(new Matcher\TypeMatcher($presenter));
     $matchers->add(new Matcher\ObjectStateMatcher($presenter));
     return $matchers;
 }