TextExpectation::testMessage PHP Method

testMessage() public method

Returns a human readable test message.
public testMessage ( mixed $compare ) : string
$compare mixed Comparison value.
return string Description of success or failure.
    public function testMessage($compare)
    {
        if ($this->test($compare)) {
            return $this->describeTextMatch($this->getSubstring(), $compare);
        } else {
            $dumper = $this->getDumper();
            return 'Text [' . $this->getSubstring() . '] not detected in [' . $dumper->describeValue($compare) . ']';
        }
    }