comparison core/modules/contact/tests/src/Functional/ContactPersonalTest.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children af1871eacc83
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
1 <?php 1 <?php
2 2
3 namespace Drupal\Tests\contact\Functional; 3 namespace Drupal\Tests\contact\Functional;
4 4
5 use Drupal\Component\Utility\SafeMarkup; 5 use Drupal\Component\Render\FormattableMarkup;
6 use Drupal\Component\Render\PlainTextOutput; 6 use Drupal\Component\Render\PlainTextOutput;
7 use Drupal\Core\Session\AccountInterface; 7 use Drupal\Core\Session\AccountInterface;
8 use Drupal\Core\Test\AssertMailTrait; 8 use Drupal\Core\Test\AssertMailTrait;
9 use Drupal\Tests\BrowserTestBase; 9 use Drupal\Tests\BrowserTestBase;
10 use Drupal\Tests\system\Functional\Cache\AssertPageCacheContextsAndTagsTrait; 10 use Drupal\Tests\system\Functional\Cache\AssertPageCacheContextsAndTagsTrait;
96 // Verify that the correct watchdog message has been logged. 96 // Verify that the correct watchdog message has been logged.
97 $this->drupalGet('/admin/reports/dblog'); 97 $this->drupalGet('/admin/reports/dblog');
98 $placeholders = [ 98 $placeholders = [
99 '@sender_name' => $this->webUser->username, 99 '@sender_name' => $this->webUser->username,
100 '@sender_email' => $this->webUser->getEmail(), 100 '@sender_email' => $this->webUser->getEmail(),
101 '@recipient_name' => $this->contactUser->getUsername() 101 '@recipient_name' => $this->contactUser->getUsername(),
102 ]; 102 ];
103 $this->assertRaw(SafeMarkup::format('@sender_name (@sender_email) sent @recipient_name an email.', $placeholders)); 103 $this->assertRaw(new FormattableMarkup('@sender_name (@sender_email) sent @recipient_name an email.', $placeholders));
104 // Ensure an unescaped version of the email does not exist anywhere. 104 // Ensure an unescaped version of the email does not exist anywhere.
105 $this->assertNoRaw($this->webUser->getEmail()); 105 $this->assertNoRaw($this->webUser->getEmail());
106 } 106 }
107 107
108 /** 108 /**