Skip to content

Commit 9181e4f

Browse files
committed
Allow updating snapshots through CLI arguments
1 parent 38db120 commit 9181e4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MatchesSnapshots.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function assertMatchesSnapshot($actual, $type = 'var', $methodTrace = nul
1919
return $this->markTestIncomplete("Snapshot created for {$snapshot->id()}");
2020
}
2121

22-
if (getenv('update_snapshots') == 1) {
22+
if (in_array('--update', $_SERVER['argv'], true)) {
2323
return $this->updateSnapshot($type, $snapshot, $actual);
2424
}
2525

0 commit comments

Comments
 (0)