本文整理汇总了PHP中SimpleExpectation::overlayMessage方法的典型用法代码示例。如果您正苦于以下问题:PHP SimpleExpectation::overlayMessage方法的具体用法?PHP SimpleExpectation::overlayMessage怎么用?PHP SimpleExpectation::overlayMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleExpectation
的用法示例。
在下文中一共展示了SimpleExpectation::overlayMessage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: assert
/**
* Runs an expectation directly, for extending the
* tests with new expectation classes.
* @param SimpleExpectation $expectation Expectation subclass.
* @param mixed $compare Value to compare.
* @param string $message Message to display.
* @return boolean True on pass
* @access public
*/
function assert(&$expectation, $compare, $message = '%s') {
if ($expectation->test($compare)) {
return $this->pass(sprintf(
$message,
$expectation->overlayMessage($compare, $this->_reporter->getDumper())));
} else {
return $this->fail(sprintf(
$message,
$expectation->overlayMessage($compare, $this->_reporter->getDumper())));
}
}
示例2: assert
/**
* Runs an expectation directly, for extending the
* tests with new expectation classes.
* @param SimpleExpectation $expectation Expectation subclass.
* @param mixed $compare Value to compare.
* @param string $message Message to display.
* @return boolean True on pass
* @access public
*/
function assert(&$expectation, $compare, $message = '%s')
{
return $this->assertTrue($expectation->test($compare), sprintf($message, $expectation->overlayMessage($compare)));
}
示例3: assertExpectation
/**
* 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.
* @return boolean True on pass
* @access public
*/
function assertExpectation(&$expectation, $test_value, $message = '%s')
{
return $this->assertTrue($expectation->test($test_value), sprintf($message, $expectation->overlayMessage($test_value)));
}
示例4: assert
/**
* Runs an expectation directly, for extending the tests with new expectation classes.
*
* @param SimpleExpectation $expectation Expectation subclass.
* @param mixed $compare Value to compare.
* @param string $message Message to display.
*
* @return bool True on pass
*/
public function assert($expectation, $compare, $message = '%s')
{
$message = $this->escapePercentageSignsExceptFirst($message);
if ($expectation->test($compare)) {
return $this->pass(sprintf($message, $expectation->overlayMessage($compare, $this->reporter->getDumper())));
} else {
return $this->fail(sprintf($message, $expectation->overlayMessage($compare, $this->reporter->getDumper())));
}
}