Skip to content

Commit bc16653

Browse files
Changlog
1 parent 1ca92cc commit bc16653

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,12 @@ class JsonDriver implements Driver
234234
- We want to save json snapshots as json files, so we'll use `json` as their file extension.
235235
- When matching the expected data with the actual data, we want to use PHPUnit's built in json assertions, so we'll call the specific `assertJsonStringEqualsJsonString` method.
236236

237+
Drivers can be used by passing them as `assertMatchesSnapshot`'s second argument.
238+
239+
```php
240+
$this->assertMatchesSnapshot($something->toYaml(), new MyYamlDriver());
241+
```
242+
237243
## Changelog
238244

239245
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

0 commit comments

Comments
 (0)