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.
Esempio n. 1
0
 /**
  *    Runs an expectation directly, for extending the
  *    tests with new expectation classes.
  *    @param SimpleExpectation $expectation  Expectation subclass.
  *    @param mixed $test_value               Value to compare.
  *    @param string $message                 Message to display.
  *    @access public
  */
 function assertExpectation(&$expectation, $test_value, $message = '%s')
 {
     $this->assertTrue($expectation->test($test_value), sprintf($message, $expectation->testMessage($test_value)));
 }