Skip to content

Commit 79e37b7

Browse files
Remove VarDriver in favor of ObjectDriver
1 parent 47df47e commit 79e37b7

23 files changed

+16
-42
lines changed

src/Drivers/VarDriver.php

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/MatchesSnapshots.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use ReflectionObject;
88
use Spatie\Snapshots\Drivers\HtmlDriver;
99
use Spatie\Snapshots\Drivers\JsonDriver;
10-
use Spatie\Snapshots\Drivers\VarDriver;
10+
use Spatie\Snapshots\Drivers\ObjectDriver;
1111
use Spatie\Snapshots\Drivers\XmlDriver;
1212
use Spatie\Snapshots\Drivers\YamlDriver;
1313

@@ -49,7 +49,7 @@ public function assertMatchesSnapshot($actual, Driver $driver = null)
4949
return;
5050
}
5151

52-
$this->doSnapshotAssertion($actual, $driver ?? new VarDriver());
52+
$this->doSnapshotAssertion($actual, $driver ?? new ObjectDriver());
5353
}
5454

5555
public function assertMatchesHtmlSnapshot($actual)

tests/Integration/MatchesSnapshotTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ public function it_can_create_a_snapshot_from_a_string()
3434
});
3535

3636
$this->assertSnapshotMatchesExample(
37-
'MatchesSnapshotTest__it_can_create_a_snapshot_from_a_string__1.php',
38-
'snapshot.php'
37+
'MatchesSnapshotTest__it_can_create_a_snapshot_from_a_string__1.json',
38+
'string_snapshot.json'
3939
);
4040
}
4141

@@ -285,8 +285,8 @@ public function it_can_update_a_string_snapshot()
285285
});
286286

287287
$this->assertSnapshotMatchesExample(
288-
'MatchesSnapshotTest__it_can_update_a_string_snapshot__1.php',
289-
'snapshot.php'
288+
'MatchesSnapshotTest__it_can_update_a_string_snapshot__1.json',
289+
'string_snapshot.json'
290290
);
291291
}
292292

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"Foo"

tests/Integration/stubs/__snapshots__/AssertionTest__can_do_multiple_snapshot_assertions__1.php

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"Bar"

tests/Integration/stubs/__snapshots__/AssertionTest__can_do_multiple_snapshot_assertions__2.php

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"f558f8149e33fba2916877b2d3de4a42ebd544b4"

tests/Integration/stubs/__snapshots__/AssertionTest__can_match_a_file_hash_snapshot__1.php

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"Foo"

0 commit comments

Comments
 (0)