Skip to content
Snippets Groups Projects

Issue #3232565: Tests: remove duplicated code by using assertEmailReroutedFromTestForm()

8 files
+ 82
121
Compare changes
  • Side-by-side
  • Inline
Files
8
@@ -68,7 +68,7 @@ class ContactTest extends RerouteEmailTestBase {
* @throws \Behat\Mink\Exception\ExpectationException
* Thrown when the requested page status code is a different one.
*/
public function testBasicNotification() {
public function testBasicNotification(): void {
// Additional destination email address used for testing the allowed list.
$additional_destination = 'additional@example.com';
@@ -136,7 +136,7 @@ class ContactTest extends RerouteEmailTestBase {
// There should be nothing in the body except the contact message - no
// body injection like 'Originally to'.
$this->assertTrue(strpos($mail['body'], 'Originally to') === FALSE, 'Body does not contain "Originally to".');
$this->assertStringNotContainsString('Originally to', $mail['body'], 'Body does not contain "Originally to".');
$this->assertEquals($mail['headers']['X-Rerouted-Original-To'], $this->originalDestination, 'X-Rerouted-Original-To is correctly set to the original destination email.');
}
Loading