-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add protection against double inclusion of global function declarations
- Loading branch information
Alexander Obuhovich
committed
Jan 17, 2015
1 parent
734f9a1
commit a5b33d0
Showing
5 changed files
with
746 additions
and
741 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
if (!function_exists('assertThat')) { | ||
/** | ||
* Make an assertion and throw {@link Hamcrest_AssertionError} if it fails. | ||
* | ||
* Example: | ||
* <pre> | ||
* //With an identifier | ||
* assertThat("assertion identifier", $apple->flavour(), equalTo("tasty")); | ||
* //Without an identifier | ||
* assertThat($apple->flavour(), equalTo("tasty")); | ||
* //Evaluating a boolean expression | ||
* assertThat("some error", $a > $b); | ||
* </pre> | ||
*/ | ||
function assertThat() | ||
{ | ||
$args = func_get_args(); | ||
call_user_func_array( | ||
array('Hamcrest\MatcherAssert', 'assertThat'), | ||
$args | ||
); | ||
} |
Oops, something went wrong.