/home/techb158/dev.balacoffee.com/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest
NameSizeModeActions
Arrays/-0755rm
Collection/-0755rm
Core/-0755rm
Internal/-0755rm
Number/-0755rm
Text/-0755rm
Type/-0755rm
Xml/-0755rm
AssertionError.php1190644editdlrm
BaseDescription.php31790644editdlrm
BaseMatcher.php5650644editdlrm
Description.php16880644editdlrm
DiagnosingMatcher.php6030644editdlrm
FeatureMatcher.php19930644editdlrm
Matcher.php16270644editdlrm
MatcherAssert.php33870644editdlrm
Matchers.php189610644editdlrm
NullDescription.php6990644editdlrm
SelfDescribing.php5350644editdlrm
StringDescription.php11230644editdlrm
TypeSafeDiagnosingMatcher.php8410644editdlrm
TypeSafeMatcher.php29180644editdlrm
Util.php20650644editdlrm
Edit: /home/techb158/dev.balacoffee.com/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php (3387B)
* // With an identifier * assertThat("apple flavour", $apple->flavour(), equalTo("tasty")); * // Without an identifier * assertThat($apple->flavour(), equalTo("tasty")); * // Evaluating a boolean expression * assertThat("some error", $a > $b); * assertThat($a > $b); * */ public static function assertThat(/* $args ... */) { $args = func_get_args(); switch (count($args)) { case 1: self::$_count++; if (!$args[0]) { throw new AssertionError(); } break; case 2: self::$_count++; if ($args[1] instanceof Matcher) { self::doAssert('', $args[0], $args[1]); } elseif (!$args[1]) { throw new AssertionError($args[0]); } break; case 3: self::$_count++; self::doAssert( $args[0], $args[1], Util::wrapValueWithIsEqual($args[2]) ); break; default: throw new \InvalidArgumentException('assertThat() requires one to three arguments'); } } /** * Returns the number of assertions performed. * * @return int */ public static function getCount() { return self::$_count; } /** * Resets the number of assertions performed to zero. */ public static function resetCount() { self::$_count = 0; } /** * Performs the actual assertion logic. * * If $matcher doesn't match $actual, * throws a {@link Hamcrest\AssertionError} with a description * of the failure along with the optional $identifier. * * @param string $identifier added to the message upon failure * @param mixed $actual value to compare against $matcher * @param \Hamcrest\Matcher $matcher applied to $actual * @throws AssertionError */ private static function doAssert($identifier, $actual, Matcher $matcher) { if (!$matcher->matches($actual)) { $description = new StringDescription(); if (!empty($identifier)) { $description->appendText($identifier . PHP_EOL); } $description->appendText('Expected: ') ->appendDescriptionOf($matcher) ->appendText(PHP_EOL . ' but: '); $matcher->describeMismatch($actual, $description); throw new AssertionError((string) $description); } } }