Skip to content

Commit 81efb53

Browse files
committed
remove if statement
1 parent f94d028 commit 81efb53

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

tests/dailymail_test.php

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -178,17 +178,16 @@ public function test_delivery_not_enrolled(): void {
178178
// There should be 2 mails.
179179
$this->assertEquals(2, $messages);
180180

181-
// Check the recipient of the mails and the discussion that is addressed. There should be false addressed mails.
181+
// Check the recipient of the mails and the discussion that is addressed. There should be no false addressed discussions.
182182
$firstmail = $content[0];
183183
$secondmail = $content[1];
184-
if ($firstmail->to == "[email protected]") {
185-
$this->assertStringContainsString($this->discussion[0]->name, $firstmail->body);
186-
$this->assertStringNotContainsString($discussion[0]->name, $firstmail->body);
187-
} else {
188-
$this->assertEquals('[email protected]', $secondmail->to);
189-
$this->assertStringContainsString($discussion[0]->name, $secondmail->body);
190-
$this->assertStringNotContainsString($this->discussion[0]->name, $secondmail->body);
191-
}
184+
$this->assertEquals('[email protected]', $firstmail->to);
185+
$this->assertStringContainsString($this->discussion[0]->name, $firstmail->body);
186+
$this->assertStringNotContainsString($discussion[0]->name, $firstmail->body);
187+
188+
$this->assertEquals('[email protected]', $secondmail->to);
189+
$this->assertStringContainsString($discussion[0]->name, $secondmail->body);
190+
$this->assertStringNotContainsString($this->discussion[0]->name, $secondmail->body);
192191
}
193192

194193

0 commit comments

Comments
 (0)