From c5dbd43cf6d7d7e5d1f3cf4929b255b0f3b5887d Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Sun, 6 Sep 2015 22:43:41 +0100 Subject: [PATCH] Issue #2555169 by TR: API documentation should not suggest using deprecated function format_string() --- .../simpletest/src/AssertContentTrait.php | 185 +++++++++++------- core/modules/simpletest/src/WebTestBase.php | 30 +-- .../src/Tests/Handler/FieldKernelTest.php | 10 +- 3 files changed, 135 insertions(+), 90 deletions(-) diff --git a/core/modules/simpletest/src/AssertContentTrait.php b/core/modules/simpletest/src/AssertContentTrait.php index eaf4b4195d10..2c015ca13e84 100644 --- a/core/modules/simpletest/src/AssertContentTrait.php +++ b/core/modules/simpletest/src/AssertContentTrait.php @@ -311,8 +311,9 @@ protected function assertLink($label, $index = 0, $message = '', $group = 'Other * Text between the anchor tags. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -337,8 +338,9 @@ protected function assertNoLink($label, $message = '', $group = 'Other') { * Link position counting from zero. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -361,8 +363,9 @@ protected function assertLinkByHref($href, $index = 0, $message = '', $group = ' * The full or partial value of the 'href' attribute of the anchor tag. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -385,8 +388,9 @@ protected function assertNoLinkByHref($href, $message = '', $group = 'Other') { * The full or partial value of the 'href' attribute of the anchor tag. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -411,8 +415,9 @@ protected function assertNoLinkByHrefInMainRegion($href, $message = '', $group = * Raw (HTML) string to look for. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -438,8 +443,9 @@ protected function assertRaw($raw, $message = '', $group = 'Other') { * Raw (HTML) string to look for. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -465,8 +471,9 @@ protected function assertNoRaw($raw, $message = '', $group = 'Other') { * Raw (HTML) string to look for. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -493,8 +500,9 @@ protected function assertEscaped($raw, $message = '', $group = 'Other') { * Raw (HTML) string to look for. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -521,8 +529,9 @@ protected function assertNoEscaped($raw, $message = '', $group = 'Other') { * Plain text to look for. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -548,8 +557,9 @@ protected function assertText($text, $message = '', $group = 'Other') { * Plain text to look for. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -574,8 +584,9 @@ protected function assertNoText($text, $message = '', $group = 'Other') { * Plain text to look for. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -606,8 +617,9 @@ protected function assertTextHelper($text, $message = '', $group = 'Other', $not * Plain text to look for. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -632,8 +644,9 @@ protected function assertUniqueText($text, $message = '', $group = 'Other') { * Plain text to look for. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -656,8 +669,9 @@ protected function assertNoUniqueText($text, $message = '', $group = 'Other') { * Plain text to look for. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -690,8 +704,9 @@ protected function assertUniqueTextHelper($text, $message = '', $group = 'Other' * Perl regex to look for including the regex delimiters. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -715,8 +730,9 @@ protected function assertPattern($pattern, $message = '', $group = 'Other') { * Perl regex to look for including the regex delimiters. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -763,8 +779,9 @@ protected function assertTextPattern($pattern, $message = NULL, $group = 'Other' * The string the title should be. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -797,8 +814,9 @@ protected function assertTitle($title, $message = '', $group = 'Other') { * The string the title should not be. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -830,8 +848,9 @@ protected function assertNoTitle($title, $message = '', $group = 'Other') { * The expected themed output string. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -873,8 +892,9 @@ protected function assertThemeOutput($callback, array $variables = array(), $exp * checking the actual value, while still checking that the field exists. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -930,8 +950,9 @@ protected function assertFieldsByValue($fields, $value = NULL, $message = '', $g * exists. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -980,8 +1001,9 @@ protected function getSelectedItem(\SimpleXMLElement $element) { * page does not match it. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -1020,8 +1042,9 @@ protected function assertNoFieldByXPath($xpath, $value = NULL, $message = '', $g * exists. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -1060,8 +1083,9 @@ protected function assertFieldByName($name, $value = NULL, $message = NULL, $gro * default value ('') asserts that the field value is not an empty string. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -1087,8 +1111,9 @@ protected function assertNoFieldByName($name, $value = '', $message = '', $group * string. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -1114,8 +1139,9 @@ protected function assertFieldById($id, $value = '', $message = '', $group = 'Br * value ('') asserts that the field value is not an empty string. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -1136,8 +1162,9 @@ protected function assertNoFieldById($id, $value = '', $message = '', $group = ' * ID of field to assert. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -1159,8 +1186,9 @@ protected function assertFieldChecked($id, $message = '', $group = 'Browser') { * ID of field to assert. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -1184,8 +1212,9 @@ protected function assertNoFieldChecked($id, $message = '', $group = 'Browser') * Option to assert. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -1209,8 +1238,9 @@ protected function assertOption($id, $option, $message = '', $group = 'Browser') * Option to assert. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -1234,8 +1264,9 @@ protected function assertOptionWithDrupalSelector($drupal_selector, $option, $me * Option to assert. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -1260,8 +1291,9 @@ protected function assertNoOption($id, $option, $message = '', $group = 'Browser * Option to assert. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -1287,8 +1319,9 @@ protected function assertOptionSelected($id, $option, $message = '', $group = 'B * Option to assert. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -1314,8 +1347,9 @@ protected function assertOptionSelectedWithDrupalSelector($drupal_selector, $opt * Option to assert. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -1337,8 +1371,9 @@ protected function assertNoOptionSelected($id, $option, $message = '', $group = * Name or ID of field to assert. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -1359,8 +1394,9 @@ protected function assertField($field, $message = '', $group = 'Other') { * Name or ID of field to assert. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -1379,8 +1415,9 @@ protected function assertNoField($field, $message = '', $group = 'Other') { * * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php index 5e8682659269..8e149f8d573b 100644 --- a/core/modules/simpletest/src/WebTestBase.php +++ b/core/modules/simpletest/src/WebTestBase.php @@ -2662,8 +2662,9 @@ protected function drupalGetMails($filter = array()) { * (optional) Any additional options to pass for $path to the url generator. * @param $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -2702,8 +2703,9 @@ protected function assertUrl($path, array $options = array(), $message = '', $gr * of all codes see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html. * @param $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -2727,8 +2729,9 @@ protected function assertResponse($code, $message = '', $group = 'Browser') { * of all codes see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html. * @param $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -2756,8 +2759,9 @@ protected function assertNoResponse($code, $message = '', $group = 'Browser') { * Value of the field to assert. * @param $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -2784,8 +2788,9 @@ protected function assertMail($name, $value = '', $message = '', $group = 'Email * Number of emails to search for string, starting with most recent. * @param $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -2824,8 +2829,9 @@ protected function assertMailString($field_name, $string, $email_depth, $message * Pattern to search for. * @param $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not diff --git a/core/modules/views/src/Tests/Handler/FieldKernelTest.php b/core/modules/views/src/Tests/Handler/FieldKernelTest.php index b1897cd841d4..70940d0c4dd0 100644 --- a/core/modules/views/src/Tests/Handler/FieldKernelTest.php +++ b/core/modules/views/src/Tests/Handler/FieldKernelTest.php @@ -105,8 +105,9 @@ public function testQuery() { * The value to search for. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not @@ -129,8 +130,9 @@ protected function assertSubString($haystack, $needle, $message = '', $group = ' * The value to search for. * @param string $message * (optional) A message to display with the assertion. Do not translate - * messages: use format_string() to embed variables in the message text, not - * t(). If left blank, a default message will be displayed. + * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed + * variables in the message text, not t(). If left blank, a default message + * will be displayed. * @param string $group * (optional) The group this message is in, which is displayed in a column * in test output. Use 'Debug' to indicate this is debugging output. Do not -- GitLab