File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -274,13 +274,29 @@ Drivers can be used by passing them as `assertMatchesSnapshot`'s second argument
274274$this->assertMatchesSnapshot($something->toYaml(), new MyYamlDriver());
275275```
276276
277+ ### Usage in CI
278+
279+ When running your tests in Continuous Integration you would possibility want to disable the snapshots' creation.
280+
281+ By using the ` --no-create-snapshots ` parameter, Phpunit will fail if the snapshots don't exist.
282+
283+ ``` bash
284+ > ./vendor/bin/phpunit -d --no-create-snapshots
285+
286+ 1) ExampleTest::test_it_matches_a_string
287+ Snapshot " ExampleTest__test_it_matches_a_string__1.txt" does not exist.
288+ You can automatically create it by removing ` -d --no-create-snapshots` of PHPUnit' s CLI arguments.
289+
290+ ```
291+
292+
277293## Changelog
278294
279295Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
280296
281297## Testing
282298
283- ``` bash
299+ ```bash
284300composer test
285301```
286302
You can’t perform that action at this time.
0 commit comments