File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 66use Symfony \Bundle \FrameworkBundle \Test \WebTestCase ;
77
88#[Group('integration ' )]
9+ /**
10+ * @infection-ignore-all
11+ */
912class SignupControllerTest extends WebTestCase
1013{
1114 public function testSignupPageLoads (): void
Original file line number Diff line number Diff line change @@ -62,6 +62,26 @@ public function testSendFeedbackEmailTriggersMailer(): void
6262 $ aboutModel ->sendFeedbackEmail ($ data );
6363 }
6464
65+ public function testSendFeedbackEmailWithNoEnailTriggersMailerWithDefaultEmail (): void
66+ {
67+ // Side-effect test: verify mailer is called.
68+ $ mailer = $ this ->createMock (Mailer::class);
69+ $ mailer ->expects ($ this ->once ())->method ('sendFeedbackEmail ' );
70+ $ entityManager = $ this ->createStub (EntityManagerInterface::class);
71+
72+ $ category = new FeedbackCategory ();
73+ $ category ->setEmailtonotify ('admin@example.com ' );
74+
75+ $ data = [
76+ 'IdCategory ' => $ category ,
77+ 'FeedbackEmail ' => null ,
78+ 'message ' => 'hello ' ,
79+ ];
80+
81+ $ aboutModel = new AboutModel ($ entityManager , $ mailer );
82+ $ aboutModel ->sendFeedbackEmail ($ data );
83+ }
84+
6585 public function testAddFeedbackPersistsData (): void
6686 {
6787 // Side-effect test: verify persistence.
You can’t perform that action at this time.
0 commit comments