public function doAssert(\Hamcrest_Matcher $matcher, $message = null) { if (!empty($message)) { \Hamcrest_MatcherAssert::assertThat($message, $this->value, $matcher); } else { \Hamcrest_MatcherAssert::assertThat($this->value, $matcher); } }
public function doAssert(\Hamcrest_Matcher $matcher, $message = null) { if (!empty($message)) { \Hamcrest_MatcherAssert::assertThat($message, $this->value, \Hamcrest_Core_IsCollectionContaining::hasItem($matcher)); } else { \Hamcrest_MatcherAssert::assertThat($this->value, \Hamcrest_Core_IsCollectionContaining::hasItem($matcher)); } }
public function testAssertThatWithFourArgsThrowsErrorAndDoesntIncrementCount() { try { Hamcrest_MatcherAssert::assertThat(1, 2, 3, 4); self::fail('expected invalid argument exception'); } catch (InvalidArgumentException $ex) { self::assertEquals(0, Hamcrest_MatcherAssert::getCount(), 'assertion count'); } }