diff --git a/core/modules/contact/src/Tests/ContactSitewideTest.php b/core/modules/contact/src/Tests/ContactSitewideTest.php index e0456d2..25cec88 100644 --- a/core/modules/contact/src/Tests/ContactSitewideTest.php +++ b/core/modules/contact/src/Tests/ContactSitewideTest.php @@ -40,13 +40,6 @@ protected function setUp() { } /** - * Exceptions thrown by site under test that contain this text are ignored. - * - * @var string - */ - protected $expectedExceptionMessage; - - /** * Tests configuration options and the site-wide contact form. */ function testSiteWideContact() { @@ -398,20 +391,19 @@ function testAutoReply() { $captured_emails = $this->drupalGetMails(array('id' => 'contact_page_autoreply', 'to' => $email)); $this->assertEqual(count($captured_emails), 0); - // Verify that the current error message doesn't show, that the auto-reply doesn't get sent and the correct silent error gets logged. + // Verify that the current error message doesn't show, that the auto-reply + // doesn't get sent and the correct silent error gets logged. $email = ''; entity_get_form_display('contact_message', 'foo', 'default') ->removeComponent('mail') ->save(); $this->submitContact($this->randomMachineName(16), $email, $this->randomString(64), 'foo', $this->randomString(128)); - $this->expectedExceptionMessage = 'Unable to send email. Contact the site administrator if the problem persists.'; - $this->assertNoText($this->expectedExceptionMessage); + $this->assertNoText('Unable to send email. Contact the site administrator if the problem persists.'); $captured_emails = $this->drupalGetMails(['id' => 'contact_page_autoreply', 'to' => $email]); $this->assertEqual(count($captured_emails), 0); $this->drupalLogin($admin_user); $this->drupalGet('admin/reports/dblog'); - $this->expectedExceptionMessage = 'Error sending autoreply, missing sender mail-address in foo'; - $this->assertRaw($this->expectedExceptionMessage); + $this->assertRaw('Error sending autoreply, missing sender mail-address in foo'); } /**