function it_should_match_pattern_against_subject(Pattern $pattern) { $pattern->__toString()->willReturn("/./"); $this->matches($pattern)->shouldReturn(true); $pattern->__toString()->willReturn("/different/"); $this->matches($pattern)->shouldReturn(false); }