AnythingExpectation::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)
    {
        $dumper = $this->getDumper();
        return 'Anything always matches [' . $dumper->describeValue($compare) . ']';
    }

Usage Example

 function testSimpleInteger()
 {
     $expectation = new AnythingExpectation();
     $this->assertTrue($expectation->test(33));
     $this->assertPattern('/matches.*33/i', $expectation->testMessage(33));
 }
AnythingExpectation