本文整理汇总了PHP中EqualExpectation::test方法的典型用法代码示例。如果您正苦于以下问题:PHP EqualExpectation::test方法的具体用法?PHP EqualExpectation::test怎么用?PHP EqualExpectation::test使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EqualExpectation
的用法示例。
在下文中一共展示了EqualExpectation::test方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test
/**
* Tests the expectation. True if it differs from the
* held value.
* @param mixed $compare Comparison value.
* @return boolean True if correct.
* @access public
*/
function test($compare)
{
return !parent::test($compare);
}
示例2: testEqualComparisonOfMocksDoesNotCrash
function testEqualComparisonOfMocksDoesNotCrash()
{
$expectation = new EqualExpectation(new MockDummy());
$this->assertTrue($expectation->test(new MockDummy(), true));
}
示例3: test
function test($compare)
{
return parent::test(str_replace('\\', '/', $compare));
}
示例4: EqualExpectation
function testHashWithOutOfOrderKeysShouldStillMatch()
{
$any_order = new EqualExpectation(array('a' => 1, 'b' => 2));
$this->assertTrue($any_order->test(array('b' => 2, 'a' => 1)));
}
示例5: test
public function test($compare)
{
return parent::test(str_replace("\\", '/', $compare));
}
示例6: testMessage
function testMessage($compare)
{
$message = '';
foreach ($this->expected as $key => $value) {
if (isset($compare[$key])) {
$e = new EqualExpectation($value);
if ($e->test($compare[$key])) {
$message .= $key . ' ok.';
} else {
$message .= $key . ' => ' . $e->overlayMessage($compare[$key], $this->_dumper);
}
} else {
return $key . ' not found';
}
}
return $message;
}