Пример #1
0
 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);
     }
 }
Пример #2
0
 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));
     }
 }
Пример #3
0
 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');
     }
 }