find() public method

public find ( string $keyword, mixed $subject, array $arguments ) : PhpSpec\Matcher\Matcher
$keyword string
$subject mixed
$arguments array
return PhpSpec\Matcher\Matcher
Example #1
0
 function it_creates_negative_throw_expectations(MatcherManager $matchers, Matcher $matcher, Subject $subject)
 {
     $matchers->find(Argument::cetera())->willReturn($matcher);
     $subject->__call('getWrappedObject', array())->willReturn(new \stdClass());
     $expectation = $this->create('shouldNotThrow', $subject);
     $expectation->shouldHaveType('PhpSpec\\Wrapper\\Subject\\Expectation\\NegativeThrow');
 }
Example #2
0
 /**
  * @param string $name
  * @param mixed  $subject
  * @param array  $arguments
  *
  * @return Matcher
  */
 private function findMatcher($name, $subject, array $arguments = array())
 {
     $unwrapper = new Unwrapper();
     $arguments = $unwrapper->unwrapAll($arguments);
     return $this->matchers->find($name, $subject, $arguments);
 }