expectation.php
protected function describePatternMatch($pattern, $subject)
    {
        preg_match($pattern, $subject, $matches);
        $position = strpos($subject, $matches[0]);
        $dumper   = $this->getDumper();

        return "Pattern [$pattern] detected at character [$position] in [" .
                $dumper->describeValue($subject) . '] as [' .
                $matches[0] . '] in region [' .
                $dumper->clipString($subject, 100, $position) . ']';
    }
protected function describePatternMatch($pattern, $subject)
    {
        preg_match($pattern, $subject, $matches);
        $position = strpos($subject, $matches[0]);
        $dumper   = $this->getDumper();

        return "Pattern [$pattern] detected at character [$position] in [" .
                $dumper->describeValue($subject) . '] as [' .
                $matches[0] . '] in region [' .
                $dumper->clipString($subject, 100, $position) . ']';
    }
protected function describePatternMatch ( $ pattern , $ subject ) { preg_match ( $ pattern , $ subject , $ matches ) ; $ position = strpos ( $ subject , $ matches [ 0 ] ) ; $ dumper = $ this -> getDumper ( ) ; return "Pattern [$pattern] detected at character [$position] in [" . $ dumper -> describeValue ( $ subject ) . '] as [' . $ matches [ 0 ] . '] in region [' . $ dumper -> clipString ( $ subject , 100 , $ position ) . ']' ; }
Describes a pattern match including the string found and it's position.

@param string $pattern        Regex to match against.
@param string $subject        Subject to search.
Describes a pattern match including the string found and it s position .