Skip to content

Commit

Permalink
Updated documentation to include correct information about PHPUnit ex…
Browse files Browse the repository at this point in the history
…tension installation
  • Loading branch information
FlyingDR committed Nov 4, 2023
1 parent ad5fbc8 commit 35dbef9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ test.

In order to simplify use of the library and to ensure correct enabling / disabling of the date adjustment functionality in tests - it is possible to use `AdjustableDate` PHP attribute.

To enable use of the attribute you need to edit your PHPUnit configuration (`phpunit.xml`) and add test listener:
To enable use of the attribute you need to edit your PHPUnit configuration (`phpunit.xml`) and add test extension:

```xml

<listeners>
<!-- ... other listeners ... -->
<listener class="Flying\Date\PHPUnit\Listener\AdjustableDateListener"/>
</listeners>
<extensions>
<!-- ... other extensions ... -->
<bootstrap class="Flying\Date\PHPUnit\Extension\DateExtension"/>
</extensions>
```

Then for test classes or (preferably) test methods that need to use adjustable date functionality you need to add `#[AdjustableDate]` attribute. It accepts optional configuration parameters:
Expand Down

0 comments on commit 35dbef9

Please sign in to comment.