Skip to content

Commit 07999b4

Browse files
author
thisismeonmounteverest
committed
Ignore tests for infection.
1 parent ddfcf18 commit 07999b4

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

tests/Controller/SignupControllerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
77

88
#[Group('integration')]
9+
/**
10+
* @infection-ignore-all
11+
*/
912
class SignupControllerTest extends WebTestCase
1013
{
1114
public function testSignupPageLoads(): void

tests/Model/AboutModelTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)