Skip to content

Commit 1ca92cc

Browse files
Add driver parameter to assertMatchesSnapshot
1 parent e243814 commit 1ca92cc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
All notable changes to `phpunit-snapshot-assertions` will be documented in this file
44

5-
## 0.4.0 - 2017-03-27
5+
## 0.4.1 - 2017-03-27
66

77
- Initial release

src/MatchesSnapshots.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ public function setUpSnapshotIncrementor()
2020
$this->snapshotIncrementor = 0;
2121
}
2222

23-
public function assertMatchesSnapshot($actual)
23+
public function assertMatchesSnapshot($actual, Driver $driver = null)
2424
{
25-
$this->doSnapshotAssertion($actual, new VarDriver());
25+
$this->doSnapshotAssertion($actual, $driver ?? new VarDriver());
2626
}
2727

2828
public function assertMatchesXmlSnapshot($actual)
2929
{
30-
$this->doSnapshotAssertion($actual, new XmlDriver());
30+
$this->assertMatchesSnapshot($actual, new XmlDriver());
3131
}
3232

3333
public function assertMatchesJsonSnapshot($actual)
3434
{
35-
$this->doSnapshotAssertion($actual, new JsonDriver());
35+
$this->assertMatchesSnapshot($actual, new JsonDriver());
3636
}
3737

3838
/**

0 commit comments

Comments
 (0)