spec\PhpSpec\Runner\MatcherManagerSpec::it_searches_matchers_by_their_priority PHP Метод

it_searches_matchers_by_their_priority() публичный Метод

public it_searches_matchers_by_their_priority ( PhpSpec\Matcher\Matcher $matcher1, PhpSpec\Matcher\Matcher $matcher2 )
$matcher1 PhpSpec\Matcher\Matcher
$matcher2 PhpSpec\Matcher\Matcher
    function it_searches_matchers_by_their_priority(Matcher $matcher1, Matcher $matcher2)
    {
        $matcher1->getPriority()->willReturn(2);
        $matcher1->supports('startWith', 'hello, world', array('hello'))->willReturn(true);
        $matcher2->getPriority()->willReturn(5);
        $matcher2->supports('startWith', 'hello, world', array('hello'))->willReturn(true);
        $this->add($matcher1);
        $this->add($matcher2);
        $this->find('startWith', 'hello, world', array('hello'))->shouldReturn($matcher2);
    }