summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxjm2015-09-27 18:27:45 +0200
committerxjm2015-09-27 18:27:45 +0200
commita85c80faaa127b0eba12f55317d73892c2a620c2 (patch)
tree2e399aafcb7b89b4502b0050d23ecca7241651fb
parente8b5f468134dc3d5a841b9f905ae26e82ab12df2 (diff)
Issue #2575599 by jaredsmith, joshi.rohit100, dawehner, xjm, alexpott, plach, Berdir, Sutharsan, borisson_, justAChris, stefan.r, joelpittet, Ryan Weal: Remove !placeholder in ContactPersonalTest and Drupal\migrate\Plugin\migrate\id_map\Sql
-rw-r--r--core/modules/contact/src/Tests/ContactPersonalTest.php12
-rw-r--r--core/modules/migrate/src/Plugin/migrate/id_map/Sql.php4
2 files changed, 9 insertions, 7 deletions
diff --git a/core/modules/contact/src/Tests/ContactPersonalTest.php b/core/modules/contact/src/Tests/ContactPersonalTest.php
index 031ee75..7028a48 100644
--- a/core/modules/contact/src/Tests/ContactPersonalTest.php
+++ b/core/modules/contact/src/Tests/ContactPersonalTest.php
@@ -8,6 +8,7 @@
namespace Drupal\contact\Tests;
use Drupal\Component\Utility\SafeMarkup;
+use Drupal\Component\Utility\PlainTextOutput;
use Drupal\Core\Session\AccountInterface;
use Drupal\simpletest\WebTestBase;
use Drupal\user\RoleInterface;
@@ -79,12 +80,13 @@ class ContactPersonalTest extends WebTestBase {
$this->assertEqual($mail['reply-to'], $this->webUser->getEmail());
$this->assertEqual($mail['key'], 'user_mail');
$variables = array(
- '!site-name' => $this->config('system.site')->get('name'),
- '!subject' => $message['subject[0][value]'],
- '!recipient-name' => $this->contactUser->getUsername(),
+ '@site-name' => $this->config('system.site')->get('name'),
+ '@subject' => $message['subject[0][value]'],
+ '@recipient-name' => $this->contactUser->getUsername(),
);
- $this->assertEqual($mail['subject'], t('[!site-name] !subject', $variables), 'Subject is in sent message.');
- $this->assertTrue(strpos($mail['body'], 'Hello ' . $variables['!recipient-name']) !== FALSE, 'Recipient name is in sent message.');
+ $subject = PlainTextOutput::renderFromHtml(t('[@site-name] @subject', $variables));
+ $this->assertEqual($mail['subject'], $subject, 'Subject is in sent message.');
+ $this->assertTrue(strpos($mail['body'], 'Hello ' . $variables['@recipient-name']) !== FALSE, 'Recipient name is in sent message.');
$this->assertTrue(strpos($mail['body'], $this->webUser->getUsername()) !== FALSE, 'Sender name is in sent message.');
$this->assertTrue(strpos($mail['body'], $message['message[0][value]']) !== FALSE, 'Message body is in sent message.');
diff --git a/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php b/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
index ef2f03e..12bb419 100644
--- a/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
+++ b/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
@@ -507,8 +507,8 @@ class Sql extends PluginBase implements MigrateIdMapInterface, ContainerFactoryP
// A NULL key value will fail.
if (!isset($source_id_values[$field_name])) {
$this->message->display(t(
- 'Could not save to map table due to NULL value for key field !field',
- array('!field' => $field_name)), 'error');
+ 'Could not save to map table due to NULL value for key field @field',
+ array('@field' => $field_name)), 'error');
return;
}
$keys[$key_name] = $source_id_values[$field_name];