-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make assertions indepent from mail order
- Loading branch information
1 parent
f4d67aa
commit 0943f52
Showing
1 changed file
with
15 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -181,13 +181,21 @@ public function test_delivery_not_enrolled(): void { | |
// Check the recipient of the mails and the discussion that is addressed. There should be no false addressed discussions. | ||
$firstmail = $content[0]; | ||
$secondmail = $content[1]; | ||
$this->assertEquals('[email protected]', $firstmail->to); | ||
$this->assertStringContainsString($this->discussion[0]->name, $firstmail->body); | ||
$this->assertStringNotContainsString($discussion[0]->name, $firstmail->body); | ||
|
||
$this->assertEquals('[email protected]', $secondmail->to); | ||
$this->assertStringContainsString($discussion[0]->name, $secondmail->body); | ||
$this->assertStringNotContainsString($this->discussion[0]->name, $secondmail->body); | ||
// Depending on the order of the mails, check the recipient and the discussion that is addressed. | ||
if ($firstmail->to == "[email protected]") { | ||
$this->assertStringContainsString($this->discussion[0]->name, $firstmail->body); | ||
$this->assertStringNotContainsString($discussion[0]->name, $firstmail->body); | ||
$this->assertEquals('[email protected]', $secondmail->to); | ||
$this->assertStringContainsString($discussion[0]->name, $secondmail->body); | ||
$this->assertStringNotContainsString($this->discussion[0]->name, $secondmail->body); | ||
} else { | ||
$this->assertEquals('[email protected]', $firstmail->to); | ||
$this->assertStringContainsString($discussion[0]->name, $firstmail->body); | ||
$this->assertStringNotContainsString($this->discussion[0]->name, $firstmail->body); | ||
$this->assertEquals('[email protected]', $secondmail->to); | ||
$this->assertStringContainsString($this->discussion[0]->name, $secondmail->body); | ||
$this->assertStringNotContainsString($discussion[0]->name, $secondmail->body); | ||
} | ||
} | ||
|
||
|
||
|