public function assertMismatchDescription($expected, Hamcrest_Matcher $matcher, $arg) { $description = new Hamcrest_StringDescription(); $this->assertFalse($matcher->matches($arg), 'Precondtion: Matcher should not match item'); $matcher->describeMismatch($arg, $description); $this->assertEquals($expected, (string) $description, 'Expected mismatch description'); }
private function _describeMismatch(Hamcrest_Matcher $matcher, $item) { $this->_mismatchDescription->appendText('item with key ' . $this->_nextMatchKey . ': '); $matcher->describeMismatch($item, $this->_mismatchDescription); }