/** * 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); }
function testEqualComparisonOfMocksDoesNotCrash() { $expectation = new EqualExpectation(new MockDummy()); $this->assertTrue($expectation->test(new MockDummy(), true)); }
function test($compare) { return parent::test(str_replace('\\', '/', $compare)); }
function testHashWithOutOfOrderKeysShouldStillMatch() { $any_order = new EqualExpectation(array('a' => 1, 'b' => 2)); $this->assertTrue($any_order->test(array('b' => 2, 'a' => 1))); }
public function test($compare) { return parent::test(str_replace("\\", '/', $compare)); }
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; }