暫無描述

functions_header.txt 654B

12345678910111213141516171819202122232425
  1. if (!function_exists('assertThat')) {
  2. /**
  3. * Make an assertion and throw {@link Hamcrest_AssertionError} if it fails.
  4. *
  5. * Example:
  6. * <pre>
  7. * //With an identifier
  8. * assertThat("assertion identifier", $apple->flavour(), equalTo("tasty"));
  9. * //Without an identifier
  10. * assertThat($apple->flavour(), equalTo("tasty"));
  11. * //Evaluating a boolean expression
  12. * assertThat("some error", $a > $b);
  13. * </pre>
  14. */
  15. function assertThat()
  16. {
  17. $args = func_get_args();
  18. call_user_func_array(
  19. array('Hamcrest\MatcherAssert', 'assertThat'),
  20. $args
  21. );
  22. }
  23. }