Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,21 @@ assertThat($result === true);
assertThat(true, is(true));
```

:warning: **NOTE:** the global proxy-functions aren't autoloaded by default, so you will need to load them first:

```php
\Hamcrest\Util::registerGlobalFunctions();
```
> [!NOTE]
> To prevent tests from being marked as Risky (the `This test did not perform any assertions` message)
> add this code to your test case `tearDown` method:
>
> ```php
> $this->addToAssertionCount(\Hamcrest\MatcherAssert::getCount());
> \Hamcrest\MatcherAssert::resetCount();
> ```

> [!WARNING]
> the global proxy-functions aren't autoloaded by default, so you will need to load them first:
>
> ```php
> \Hamcrest\Util::registerGlobalFunctions();
> ```

For brevity, all of the examples below use the proxy-functions.

Expand Down