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');
 }
예제 #2
0
 private function _describeMismatch(Hamcrest_Matcher $matcher, $item)
 {
     $this->_mismatchDescription->appendText('item with key ' . $this->_nextMatchKey . ': ');
     $matcher->describeMismatch($item, $this->_mismatchDescription);
 }