Skip to content

Commit 018e0de

Browse files
Readme
1 parent b5d99f2 commit 018e0de

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
> Snapshot testing is a way to test without writing actual test cases
1111
12-
Write a snapshot test:
13-
1412
```php
1513
use Spatie\Snapshots\MatchesSnapshots;
1614

@@ -28,7 +26,7 @@ class OrderSerializerTest
2826
}
2927
```
3028

31-
Creates a snapshot on first run.
29+
On the first run, the test runner will create a new snapshot.
3230

3331
```
3432
> ./vendor/bin/phpunit
@@ -42,15 +40,15 @@ OK, but incomplete, skipped, or risky tests!
4240
Tests: 1, Assertions: 0, Incomplete: 1.
4341
```
4442

45-
Passes on subsequent runs...
43+
On subsequent runs, the test will pass as long as the snapshot doesn't change.
4644

4745
```
4846
> ./vendor/bin/phpunit
4947
5048
OK (1 test, 1 assertion)
5149
```
5250

53-
Unless there's a regression!
51+
If there's a regression, the test will fail!
5452

5553
```php
5654
$orderId = new Order(2); // Regression! Was `1`

0 commit comments

Comments
 (0)