Skip to content

Commit e2a594b

Browse files
authored
Merge pull request #127 from mathieutu/master
Fix typo in env vars doc.
2 parents 8db6021 + b7c15c3 commit e2a594b

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ By using the `--without-creating-snapshots` parameter or by setting the `CREATE_
285285

286286
1) ExampleTest::test_it_matches_a_string
287287
Snapshot "ExampleTest__test_it_matches_a_string__1.txt" does not exist.
288-
You can automatically create it by removing the `CREATE_SNAPSHOT=false` env var, or `-d --no-create-snapshots` of PHPUnit's CLI arguments.
288+
You can automatically create it by removing the `CREATE_SNAPSHOTS=false` env var, or `-d --no-create-snapshots` of PHPUnit's CLI arguments.
289289
```
290290
291291
### Usage with parallel testing
@@ -298,7 +298,7 @@ If you want to run your test in parallel with a tool like [Paratest](https://git
298298
299299
1) ExampleTest::test_it_matches_a_string
300300
Snapshot "ExampleTest__test_it_matches_a_string__1.txt" does not exist.
301-
You can automatically create it by removing the `CREATE_SNAPSHOT=false` env var, or `-d --no-create-snapshots` of PHPUnit's CLI arguments.
301+
You can automatically create it by removing the `CREATE_SNAPSHOTS=false` env var, or `-d --no-create-snapshots` of PHPUnit's CLI arguments.
302302
```
303303

304304
### A note for Windows users

src/MatchesSnapshots.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ protected function assertSnapshotShouldBeCreated(string $snapshotFileName): void
304304
$this->fail(
305305
"Snapshot \"$snapshotFileName\" does not exist.\n".
306306
'You can automatically create it by removing '.
307-
'the `CREATE_SNAPSHOT=false` env var, or '.
307+
'the `CREATE_SNAPSHOTS=false` env var, or '.
308308
'`-d --without-creating-snapshots` of PHPUnit\'s CLI arguments.'
309309
);
310310
}

tests/Integration/MatchesSnapshotTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ public function it_doesnt_create_a_regular_snapshot_and_mismatches_if_asked()
496496
$this->expectFail(
497497
$mockTrait,
498498
"Snapshot \"MatchesSnapshotTest__it_doesnt_create_a_regular_snapshot_and_mismatches_if_asked__1.txt\" does not exist.\n".
499-
"You can automatically create it by removing the `CREATE_SNAPSHOT=false` env var, or `-d --without-creating-snapshots` of PHPUnit's CLI arguments."
499+
"You can automatically create it by removing the `CREATE_SNAPSHOTS=false` env var, or `-d --without-creating-snapshots` of PHPUnit's CLI arguments."
500500
);
501501

502502
$mockTrait->assertMatchesSnapshot('Bar');
@@ -512,7 +512,7 @@ public function it_doesnt_create_a_file_snapshot_and_mismatches_if_asked()
512512
$this->expectFail(
513513
$mockTrait,
514514
"Snapshot \"MatchesSnapshotTest__it_doesnt_create_a_file_snapshot_and_mismatches_if_asked__1.jpg_failed.jpg\" does not exist.\n".
515-
"You can automatically create it by removing the `CREATE_SNAPSHOT=false` env var, or `-d --without-creating-snapshots` of PHPUnit's CLI arguments."
515+
"You can automatically create it by removing the `CREATE_SNAPSHOTS=false` env var, or `-d --without-creating-snapshots` of PHPUnit's CLI arguments."
516516
);
517517

518518
$mockTrait->assertMatchesFileSnapshot(__DIR__.'/stubs/test_files/friendly_man.jpg');
@@ -528,7 +528,7 @@ public function it_doesnt_create_a_regular_snapshot_and_mismatches_if_asked_with
528528
$this->expectFail(
529529
$mockTrait,
530530
"Snapshot \"MatchesSnapshotTest__it_doesnt_create_a_regular_snapshot_and_mismatches_if_asked_with_env_var__1.txt\" does not exist.\n".
531-
"You can automatically create it by removing the `CREATE_SNAPSHOT=false` env var, or `-d --without-creating-snapshots` of PHPUnit's CLI arguments."
531+
"You can automatically create it by removing the `CREATE_SNAPSHOTS=false` env var, or `-d --without-creating-snapshots` of PHPUnit's CLI arguments."
532532
);
533533

534534
$mockTrait->assertMatchesSnapshot('Bar');
@@ -537,14 +537,14 @@ public function it_doesnt_create_a_regular_snapshot_and_mismatches_if_asked_with
537537
/** @test */
538538
public function it_doesnt_create_a_file_snapshot_and_mismatches_if_asked_with_env_var()
539539
{
540-
putenv('CREATE_SNAPSHOT=false');
540+
putenv('CREATE_SNAPSHOTS=false');
541541

542542
$mockTrait = $this->getMatchesSnapshotMock();
543543

544544
$this->expectFail(
545545
$mockTrait,
546546
"Snapshot \"MatchesSnapshotTest__it_doesnt_create_a_file_snapshot_and_mismatches_if_asked_with_env_var__1.jpg_failed.jpg\" does not exist.\n".
547-
"You can automatically create it by removing the `CREATE_SNAPSHOT=false` env var, or `-d --without-creating-snapshots` of PHPUnit's CLI arguments."
547+
"You can automatically create it by removing the `CREATE_SNAPSHOTS=false` env var, or `-d --without-creating-snapshots` of PHPUnit's CLI arguments."
548548
);
549549

550550
$mockTrait->assertMatchesFileSnapshot(__DIR__.'/stubs/test_files/friendly_man.jpg');

0 commit comments

Comments
 (0)