File tree Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -36,25 +36,18 @@ public function maxResultsProvider(): ?\Generator
36
36
yield [2 ];
37
37
}
38
38
39
- /**
40
- * @dataProvider sendEmailProvider
41
- *
42
- * This test ensure that the command actually sends an email when the parameter is specified
43
- */
44
- public function testItSendsAnEmail (bool $ sendAndEmail ): void
39
+ public function testItSendsNoEmailByDefault (): void
45
40
{
46
- $ this ->executeCommand (
47
- // these are the arguments (only 1 is passed, the rest are missing)
48
- $ sendAndEmail ? ['--send-to ' => 'john.doe@symfony.com ' ] : []
49
- );
41
+ $ this ->executeCommand ([]);
50
42
51
- $ this ->assertEmailCount ($ sendAndEmail ? 1 : 0 );
43
+ $ this ->assertEmailCount (0 );
52
44
}
53
45
54
- public function sendEmailProvider (): ? \ Generator
46
+ public function testItSendsAnEmailIfOptionProvided (): void
55
47
{
56
- yield [true ];
57
- yield [false ];
48
+ $ this ->executeCommand (['--send-to ' => 'john.doe@symfony.com ' ]);
49
+
50
+ $ this ->assertEmailCount (1 );
58
51
}
59
52
60
53
protected function getCommandFqcn (): string
You can’t perform that action at this time.
0 commit comments