You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -234,6 +234,12 @@ class JsonDriver implements Driver
234
234
- We want to save json snapshots as json files, so we'll use `json` as their file extension.
235
235
- 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.
236
236
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
+
237
243
## Changelog
238
244
239
245
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
0 commit comments