本文整理匯總了PHP中advanced_testcase::assertEquals方法的典型用法代碼示例。如果您正苦於以下問題:PHP advanced_testcase::assertEquals方法的具體用法?PHP advanced_testcase::assertEquals怎麽用?PHP advanced_testcase::assertEquals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類advanced_testcase
的用法示例。
在下文中一共展示了advanced_testcase::assertEquals方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: assertEquals
/**
* Asserts that two variables are equal.
*
* @param mixed $expected
* @param mixed $actual
* @param string $message
* @param float $delta
* @param integer $maxDepth
* @param boolean $canonicalize
* @param boolean $ignoreCase
*/
public static function assertEquals($expected, $actual, $message = '', $delta = 0, $maxDepth = 10, $canonicalize = FALSE, $ignoreCase = FALSE)
{
// Nasty cheating hack: prevent random failures on timemodified field.
if (is_object($expected) and is_object($actual)) {
if (property_exists($expected, 'timemodified') and property_exists($actual, 'timemodified')) {
if ($expected->timemodified + 1 == $actual->timemodified) {
$expected = clone $expected;
$expected->timemodified = $actual->timemodified;
}
}
}
parent::assertEquals($expected, $actual, $message, $delta, $maxDepth, $canonicalize, $ignoreCase);
}