diff --git a/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php b/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php index ea48f4696b5f88bf380797fbfb2a6151ceda1735..2a7c9f3cb12663cf3bb5b647de78309e1372c5a0 100644 --- a/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php +++ b/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php @@ -40,7 +40,7 @@ public function testUpdateFeedItem() { $this->assertResponse(200); $this->drupalPostForm('aggregator/sources/add', $edit, t('Save')); - $this->assertRaw(t('The feed %name has been added.', array('%name' => $edit['title[0][value]'])), format_string('The feed !name has been added.', array('!name' => $edit['title[0][value]']))); + $this->assertRaw(t('The feed %name has been added.', array('%name' => $edit['title[0][value]'])), format_string('The feed @name has been added.', array('@name' => $edit['title[0][value]']))); $fid = db_query("SELECT fid FROM {aggregator_feed} WHERE url = :url", array(':url' => $edit['url[0][value]']))->fetchField(); $feed = Feed::load($fid); @@ -62,7 +62,7 @@ public function testUpdateFeedItem() { $feed->refreshItems(); $after = db_query('SELECT timestamp FROM {aggregator_item} WHERE fid = :fid', array(':fid' => $feed->id()))->fetchField(); - $this->assertTrue($before === $after, format_string('Publish timestamp of feed item was not updated (!before === !after)', array('!before' => $before, '!after' => $after))); + $this->assertTrue($before === $after, format_string('Publish timestamp of feed item was not updated (@before === @after)', array('@before' => $before, '@after' => $after))); // Make sure updating items works even after uninstalling a module // that provides the selected plugins. diff --git a/core/modules/block_content/src/Tests/BlockContentCreationTest.php b/core/modules/block_content/src/Tests/BlockContentCreationTest.php index 6bf250cfdf0b82d68e6b169e0dcfae654261157c..84f8e7f188080d300a8015ebbb1eef23a27852e6 100644 --- a/core/modules/block_content/src/Tests/BlockContentCreationTest.php +++ b/core/modules/block_content/src/Tests/BlockContentCreationTest.php @@ -48,8 +48,8 @@ public function testBlockContentCreation() { $this->drupalPostForm('block/add/basic', $edit, t('Save')); // Check that the Basic block has been created. - $this->assertRaw(format_string('!block %name has been created.', array( - '!block' => 'basic', + $this->assertRaw(format_string('@block %name has been created.', array( + '@block' => 'basic', '%name' => $edit['info[0][value]'] )), 'Basic block created.'); @@ -95,8 +95,8 @@ public function testBlockContentCreationMultipleViewModes() { $this->drupalPostForm('block/add/basic', $edit, t('Save')); // Check that the Basic block has been created. - $this->assertRaw(format_string('!block %name has been created.', array( - '!block' => 'basic', + $this->assertRaw(format_string('@block %name has been created.', array( + '@block' => 'basic', '%name' => $edit['info[0][value]'] )), 'Basic block created.'); @@ -144,8 +144,8 @@ public function testDefaultBlockContentCreation() { $this->drupalPostForm('block/add', $edit, t('Save')); // Check that the block has been created and that it is a basic block. - $this->assertRaw(format_string('!block %name has been created.', array( - '!block' => 'basic', + $this->assertRaw(format_string('@block %name has been created.', array( + '@block' => 'basic', '%name' => $edit['info[0][value]'], )), 'Basic block created.'); diff --git a/core/modules/block_content/src/Tests/BlockContentRevisionsTest.php b/core/modules/block_content/src/Tests/BlockContentRevisionsTest.php index 8da9c54c8afef371341458d65ba874d18a9fc9a4..15e7a105b1cff97807b330d9d7e3a58798db7d99 100644 --- a/core/modules/block_content/src/Tests/BlockContentRevisionsTest.php +++ b/core/modules/block_content/src/Tests/BlockContentRevisionsTest.php @@ -69,8 +69,8 @@ public function testRevisions() { // Confirm the correct revision text appears. $loaded = entity_revision_load('block_content', $revision_id); // Verify revision log is the same. - $this->assertEqual($loaded->getRevisionLog(), $logs[$delta], format_string('Correct log message found for revision !revision', array( - '!revision' => $loaded->getRevisionId(), + $this->assertEqual($loaded->getRevisionLog(), $logs[$delta], format_string('Correct log message found for revision @revision', array( + '@revision' => $loaded->getRevisionId(), ))); } diff --git a/core/modules/block_content/src/Tests/PageEditTest.php b/core/modules/block_content/src/Tests/PageEditTest.php index fdd174339c3d9b1e9cdc333259d2d7edad05f1dc..e2ce38fbd99b605e23d2e4758c941750ed56ce1b 100644 --- a/core/modules/block_content/src/Tests/PageEditTest.php +++ b/core/modules/block_content/src/Tests/PageEditTest.php @@ -64,7 +64,7 @@ public function testPageEdit() { // Test deleting the block. $this->drupalGet("block/" . $revised_block->id()); $this->clickLink(t('Delete')); - $this->assertText(format_string('Are you sure you want to delete the custom block !label?', array('!label' => $revised_block->label()))); + $this->assertText(format_string('Are you sure you want to delete the custom block @label?', array('@label' => $revised_block->label()))); } } diff --git a/core/modules/config/src/Tests/ConfigExportImportUITest.php b/core/modules/config/src/Tests/ConfigExportImportUITest.php index 6a63df7c505548ee22e47eed50a2dc60f3392b0d..e913e0d1d9c357dd8e449c2b5cb3aaa90018b131 100644 --- a/core/modules/config/src/Tests/ConfigExportImportUITest.php +++ b/core/modules/config/src/Tests/ConfigExportImportUITest.php @@ -273,8 +273,8 @@ public function testExportImportCollections() { // Verify that there are configuration differences to import. $this->drupalGet('admin/config/development/configuration'); $this->assertNoText(t('There are no configuration changes to import.')); - $this->assertText(t('!collection configuration collection', array('!collection' => 'collection.test1'))); - $this->assertText(t('!collection configuration collection', array('!collection' => 'collection.test2'))); + $this->assertText(t('@collection configuration collection', array('@collection' => 'collection.test1'))); + $this->assertText(t('@collection configuration collection', array('@collection' => 'collection.test2'))); $this->assertText('config_test.create'); $this->assertLinkByHref('admin/config/development/configuration/sync/diff_collection/collection.test1/config_test.create'); $this->assertText('config_test.update'); diff --git a/core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php b/core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php index eb5cf75c5aaa7f2c333c13a5da77bf7c538fa51e..687da5b61af9947ae61260f2a9b82f809697ca22 100644 --- a/core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php +++ b/core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php @@ -116,7 +116,7 @@ public function testMapperListPage() { $entity_type = \Drupal::entityManager()->getDefinition($test_entity->getEntityTypeId()); $this->drupalGet($base_url . '/translate'); - $title = t('!label !entity_type', array('!label' => $test_entity->label(), '!entity_type' => $entity_type->getLowercaseLabel())); + $title = t('@label @entity_type', array('@label' => $test_entity->label(), '@entity_type' => $entity_type->getLowercaseLabel())); $title = t('Translations for %label', array('%label' => $title)); $this->assertRaw($title); $this->assertRaw('' . t('Language') . ''); diff --git a/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php b/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php index 2b092a18ae66f59c33e3f004a0b418db80b5b001..13890c0e560532207d5ba91a2b7fedb008ac6276 100644 --- a/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php +++ b/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php @@ -370,7 +370,7 @@ public function testContactConfigEntityTranslation() { // Test that delete links work and operations perform properly. foreach ($this->langcodes as $langcode) { - $replacements = array('%label' => t('!label !entity_type', array('!label' => $label, '!entity_type' => Unicode::strtolower(t('Contact form')))), '@language' => \Drupal::languageManager()->getLanguage($langcode)->getName()); + $replacements = array('%label' => t('@label @entity_type', array('@label' => $label, '@entity_type' => Unicode::strtolower(t('Contact form')))), '@language' => \Drupal::languageManager()->getLanguage($langcode)->getName()); $this->drupalGet("$translation_base_url/$langcode/delete"); $this->assertRaw(t('Are you sure you want to delete the @language translation of %label?', $replacements)); diff --git a/core/modules/contact/src/Tests/ContactSitewideTest.php b/core/modules/contact/src/Tests/ContactSitewideTest.php index 83f296fad560686d361acd0f9cf6091524c2639b..651c283561607ab7367bc770500bdfdda44b32e5 100644 --- a/core/modules/contact/src/Tests/ContactSitewideTest.php +++ b/core/modules/contact/src/Tests/ContactSitewideTest.php @@ -129,7 +129,7 @@ function testSiteWideContact() { $max_length = EntityTypeInterface::BUNDLE_MAX_LENGTH; $max_length_exceeded = $max_length + 1; $this->addContactForm($id = Unicode::strtolower($this->randomMachineName($max_length_exceeded)), $label = $this->randomMachineName($max_length_exceeded), implode(',', array($recipients[0])), '', TRUE); - $this->assertText(format_string('Machine-readable name cannot be longer than !max characters but is currently !exceeded characters long.', array('!max' => $max_length, '!exceeded' => $max_length_exceeded))); + $this->assertText(format_string('Machine-readable name cannot be longer than @max characters but is currently @exceeded characters long.', array('@max' => $max_length, '@exceeded' => $max_length_exceeded))); $this->addContactForm($id = Unicode::strtolower($this->randomMachineName($max_length)), $label = $this->randomMachineName($max_length), implode(',', array($recipients[0])), '', TRUE); $this->assertRaw(t('Contact form %label has been added.', array('%label' => $label))); diff --git a/core/modules/field/src/Tests/FormTest.php b/core/modules/field/src/Tests/FormTest.php index ab949eb90f170e6b314f7dbfa22392e2d70ec15e..0ae049bbb8fa3f9a72a5539336cf5b0ccb2cc99f 100644 --- a/core/modules/field/src/Tests/FormTest.php +++ b/core/modules/field/src/Tests/FormTest.php @@ -208,7 +208,7 @@ function testFieldFormSingleRequired() { // Submit with missing required value. $edit = array(); $this->drupalPostForm('entity_test/add', $edit, t('Save')); - $this->assertRaw(t('!name field is required.', array('!name' => $this->field['label'])), 'Required field with no value fails validation'); + $this->assertRaw(t('@name field is required.', array('@name' => $this->field['label'])), 'Required field with no value fails validation'); // Create an entity $value = mt_rand(1, 127); @@ -228,7 +228,7 @@ function testFieldFormSingleRequired() { "{$field_name}[0][value]" => $value, ); $this->drupalPostForm('entity_test/manage/' . $id, $edit, t('Save')); - $this->assertRaw(t('!name field is required.', array('!name' => $this->field['label'])), 'Required field with no value fails validation'); + $this->assertRaw(t('@name field is required.', array('@name' => $this->field['label'])), 'Required field with no value fails validation'); } // function testFieldFormMultiple() { diff --git a/core/modules/field/src/Tests/String/StringFieldTest.php b/core/modules/field/src/Tests/String/StringFieldTest.php index 40cf424302d8fcdd471d772843ebfecf7bc9163b..f59d507603a9b435ec6d6c5d566022c577b6c14a 100644 --- a/core/modules/field/src/Tests/String/StringFieldTest.php +++ b/core/modules/field/src/Tests/String/StringFieldTest.php @@ -81,7 +81,7 @@ function _testTextfieldWidgets($field_type, $widget_type) { $this->drupalGet('entity_test/add'); $this->assertFieldByName("{$field_name}[0][value]", '', 'Widget is displayed'); $this->assertNoFieldByName("{$field_name}[0][format]", '1', 'Format selector is not displayed'); - $this->assertRaw(format_string('placeholder="A placeholder on !widget_type"', array('!widget_type' => $widget_type))); + $this->assertRaw(format_string('placeholder="A placeholder on @widget_type"', array('@widget_type' => $widget_type))); // Submit with some value. $value = $this->randomMachineName(); diff --git a/core/modules/file/src/Tests/SaveUploadTest.php b/core/modules/file/src/Tests/SaveUploadTest.php index baeb443bc2ec286b2aba807e218f1aa526a9916e..7c3bd4cf6d19b72c63805f9f65b499e03296817f 100644 --- a/core/modules/file/src/Tests/SaveUploadTest.php +++ b/core/modules/file/src/Tests/SaveUploadTest.php @@ -220,7 +220,7 @@ function testHandleDangerousFile() { $this->drupalPostForm('file-test/upload', $edit, t('Submit')); $this->assertResponse(200, 'Received a 200 response for posted test file.'); $this->assertNoRaw(t('For security reasons, your upload has been renamed'), 'Found no security message.'); - $this->assertRaw(t('File name is !filename', array('!filename' => $this->phpfile->filename)), 'Dangerous file was not renamed when insecure uploads is TRUE.'); + $this->assertRaw(t('File name is @filename', array('@filename' => $this->phpfile->filename)), 'Dangerous file was not renamed when insecure uploads is TRUE.'); $this->assertRaw(t('You WIN!'), 'Found the success message.'); // Check that the correct hooks were called. @@ -254,7 +254,7 @@ function testHandleFileMunge() { $this->drupalPostForm('file-test/upload', $edit, t('Submit')); $this->assertResponse(200, 'Received a 200 response for posted test file.'); $this->assertRaw(t('For security reasons, your upload has been renamed'), 'Found security message.'); - $this->assertRaw(t('File name is !filename', array('!filename' => $munged_filename)), 'File was successfully munged.'); + $this->assertRaw(t('File name is @filename', array('@filename' => $munged_filename)), 'File was successfully munged.'); $this->assertRaw(t('You WIN!'), 'Found the success message.'); // Check that the correct hooks were called. @@ -272,7 +272,7 @@ function testHandleFileMunge() { $this->drupalPostForm('file-test/upload', $edit, t('Submit')); $this->assertResponse(200, 'Received a 200 response for posted test file.'); $this->assertNoRaw(t('For security reasons, your upload has been renamed'), 'Found no security message.'); - $this->assertRaw(t('File name is !filename', array('!filename' => $this->image->getFilename())), 'File was not munged when allowing any extension.'); + $this->assertRaw(t('File name is @filename', array('@filename' => $this->image->getFilename())), 'File was not munged when allowing any extension.'); $this->assertRaw(t('You WIN!'), 'Found the success message.'); // Check that the correct hooks were called. diff --git a/core/modules/filter/src/Tests/FilterFormatAccessTest.php b/core/modules/filter/src/Tests/FilterFormatAccessTest.php index b9eeaa7ada62a832b565d952dc57d2e326ddbcb5..441be0d12b58a543e6d5c3e1def4be57db52707e 100644 --- a/core/modules/filter/src/Tests/FilterFormatAccessTest.php +++ b/core/modules/filter/src/Tests/FilterFormatAccessTest.php @@ -280,7 +280,7 @@ function testFormatWidgetPermissions() { $edit = array(); $edit['title[0][value]'] = $new_title; $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save')); - $this->assertText(t('!name field is required.', array('!name' => t('Text format'))), 'Error message is displayed.'); + $this->assertText(t('@name field is required.', array('@name' => t('Text format'))), 'Error message is displayed.'); $this->drupalGet('node/' . $node->id()); $this->assertText($old_title, 'Old title found.'); $this->assertNoText($new_title, 'New title not found.'); @@ -315,7 +315,7 @@ function testFormatWidgetPermissions() { $edit = array(); $edit['title[0][value]'] = $new_title; $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save')); - $this->assertText(t('!name field is required.', array('!name' => t('Text format'))), 'Error message is displayed.'); + $this->assertText(t('@name field is required.', array('@name' => t('Text format'))), 'Error message is displayed.'); $this->drupalGet('node/' . $node->id()); $this->assertText($old_title, 'Old title found.'); $this->assertNoText($new_title, 'New title not found.'); diff --git a/core/modules/language/src/Tests/LanguageCustomLanguageConfigurationTest.php b/core/modules/language/src/Tests/LanguageCustomLanguageConfigurationTest.php index 0927c2d0791b191acb272809a3c58d6b793bdbec..1a093c252ec9a7543e1905de04f6806c94fdad55 100644 --- a/core/modules/language/src/Tests/LanguageCustomLanguageConfigurationTest.php +++ b/core/modules/language/src/Tests/LanguageCustomLanguageConfigurationTest.php @@ -40,8 +40,8 @@ public function testLanguageConfiguration() { ); $this->drupalPostForm('admin/config/regional/language/add', $edit, t('Add custom language')); // Test validation on missing values. - $this->assertText(t('!name field is required.', array('!name' => t('Language code')))); - $this->assertText(t('!name field is required.', array('!name' => t('Language name')))); + $this->assertText(t('@name field is required.', array('@name' => t('Language code')))); + $this->assertText(t('@name field is required.', array('@name' => t('Language name')))); $empty_language = new Language(); $this->assertFieldChecked('edit-direction-' . $empty_language->getDirection(), 'Consistent usage of language direction.'); $this->assertUrl(\Drupal::url('language.add', array(), array('absolute' => TRUE)), [], 'Correct page redirection.'); diff --git a/core/modules/link/src/Tests/LinkFieldTest.php b/core/modules/link/src/Tests/LinkFieldTest.php index b39a2f5de636db7ac0f6201011f822b41f6aa42b..8247b60456fb9278fb576898542979078cb896b1 100644 --- a/core/modules/link/src/Tests/LinkFieldTest.php +++ b/core/modules/link/src/Tests/LinkFieldTest.php @@ -277,14 +277,14 @@ function testLinkTitle() { "{$field_name}[0][uri]" => 'http://www.example.com', ); $this->drupalPostForm(NULL, $edit, t('Save')); - $this->assertText(t('!name field is required.', array('!name' => t('Link text')))); + $this->assertText(t('@name field is required.', array('@name' => t('Link text')))); // Verify that the link text is not required, if the URL is empty. $edit = array( "{$field_name}[0][uri]" => '', ); $this->drupalPostForm(NULL, $edit, t('Save')); - $this->assertNoText(t('!name field is required.', array('!name' => t('Link text')))); + $this->assertNoText(t('@name field is required.', array('@name' => t('Link text')))); // Verify that a URL and link text meets requirements. $this->drupalGet('entity_test/add'); @@ -293,7 +293,7 @@ function testLinkTitle() { "{$field_name}[0][title]" => 'Example', ); $this->drupalPostForm(NULL, $edit, t('Save')); - $this->assertNoText(t('!name field is required.', array('!name' => t('Link text')))); + $this->assertNoText(t('@name field is required.', array('@name' => t('Link text')))); } } } diff --git a/core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php b/core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php index dcade86680908ced01e4cf156a00246523378f18..ad4955059b3918296aa325cac6ab229dcd82c146 100644 --- a/core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php +++ b/core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php @@ -111,7 +111,7 @@ public function testInterface() { // Check if translations are available for Drupal core. $this->drupalGet('admin/reports/translations'); - $this->assertText(t('Updates for: !project', array('!project' => t('Drupal core'))), 'Translations found'); + $this->assertText(t('Updates for: @project', array('@project' => t('Drupal core'))), 'Translations found'); $this->assertText(SafeMarkup::format('@module (@date)', array('@module' => t('Drupal core'), '@date' => format_date(REQUEST_TIME, 'html_date'))), 'Core translation update'); $update_button = $this->xpath('//input[@type="submit"][@value="' . t('Update translations') . '"]'); $this->assertTrue($update_button, 'Update translations button'); diff --git a/core/modules/menu_ui/src/Tests/MenuTest.php b/core/modules/menu_ui/src/Tests/MenuTest.php index 128d507c25cf5fada8107ad1a1139dcb49b74a62..e87cd86aa644f3d567e04bd72c3dc62037f1c868 100644 --- a/core/modules/menu_ui/src/Tests/MenuTest.php +++ b/core/modules/menu_ui/src/Tests/MenuTest.php @@ -195,8 +195,8 @@ function addCustomMenu() { // Verify that using a menu_name that is too long results in a validation // message. - $this->assertRaw(t('!name cannot be longer than %max characters but is currently %length characters long.', array( - '!name' => t('Menu name'), + $this->assertRaw(t('@name cannot be longer than %max characters but is currently %length characters long.', array( + '@name' => t('Menu name'), '%max' => MENU_MAX_MENU_NAME_LENGTH_UI, '%length' => Unicode::strlen($menu_name), ))); @@ -207,8 +207,8 @@ function addCustomMenu() { $this->drupalPostForm('admin/structure/menu/add', $edit, t('Save')); // Verify that no validation error is given for menu_name length. - $this->assertNoRaw(t('!name cannot be longer than %max characters but is currently %length characters long.', array( - '!name' => t('Menu name'), + $this->assertNoRaw(t('@name cannot be longer than %max characters but is currently %length characters long.', array( + '@name' => t('Menu name'), '%max' => MENU_MAX_MENU_NAME_LENGTH_UI, '%length' => Unicode::strlen($menu_name), ))); diff --git a/core/modules/node/src/Tests/NodeCreationTest.php b/core/modules/node/src/Tests/NodeCreationTest.php index 7972f5d84c3aa67c456776555d1cea8b2724259f..abe7ba7f1c684e79101f8df8da18dabb48793205 100644 --- a/core/modules/node/src/Tests/NodeCreationTest.php +++ b/core/modules/node/src/Tests/NodeCreationTest.php @@ -52,7 +52,7 @@ function testNodeCreation() { $this->drupalPostForm('node/add/page', $edit, t('Save')); // Check that the Basic page has been created. - $this->assertRaw(t('!post %title has been created.', array('!post' => 'Basic page', '%title' => $edit['title[0][value]'])), 'Basic page created.'); + $this->assertRaw(t('@post %title has been created.', array('@post' => 'Basic page', '%title' => $edit['title[0][value]'])), 'Basic page created.'); // Check that the node exists in the database. $node = $this->drupalGetNodeByTitle($edit['title[0][value]']); @@ -141,7 +141,7 @@ function testUnpublishedNodeCreation() { $this->assertText(t('Test page text')); // Confirm that the node was created. - $this->assertRaw(t('!post %title has been created.', array('!post' => 'Basic page', '%title' => $edit['title[0][value]']))); + $this->assertRaw(t('@post %title has been created.', array('@post' => 'Basic page', '%title' => $edit['title[0][value]']))); } /** diff --git a/core/modules/node/src/Tests/NodeRSSContentTest.php b/core/modules/node/src/Tests/NodeRSSContentTest.php index 4b63eea6964c19f37c005130a114558e2ceac0e3..144e36e81a02bd0be4f33143f4ab0c030609151d 100644 --- a/core/modules/node/src/Tests/NodeRSSContentTest.php +++ b/core/modules/node/src/Tests/NodeRSSContentTest.php @@ -45,16 +45,16 @@ function testNodeRSSContent() { $this->drupalGet('rss.xml'); // Check that content added in 'rss' view mode appear in RSS feed. - $rss_only_content = t('Extra data that should appear only in the RSS feed for node !nid.', array('!nid' => $node->id())); + $rss_only_content = t('Extra data that should appear only in the RSS feed for node @nid.', array('@nid' => $node->id())); $this->assertText($rss_only_content, 'Node content designated for RSS appear in RSS feed.'); // Check that content added in view modes other than 'rss' doesn't // appear in RSS feed. - $non_rss_content = t('Extra data that should appear everywhere except the RSS feed for node !nid.', array('!nid' => $node->id())); + $non_rss_content = t('Extra data that should appear everywhere except the RSS feed for node @nid.', array('@nid' => $node->id())); $this->assertNoText($non_rss_content, 'Node content not designed for RSS does not appear in RSS feed.'); // Check that extra RSS elements and namespaces are added to RSS feed. - $test_element = '' . t('Value of testElement RSS element for node !nid.', array('!nid' => $node->id())) . ''; + $test_element = '' . t('Value of testElement RSS element for node @nid.', array('@nid' => $node->id())) . ''; $test_ns = 'xmlns:drupaltest="http://example.com/test-namespace"'; $this->assertRaw($test_element, 'Extra RSS elements appear in RSS feed.'); $this->assertRaw($test_ns, 'Extra namespaces appear in RSS feed.'); diff --git a/core/modules/node/tests/modules/node_test/node_test.module b/core/modules/node/tests/modules/node_test/node_test.module index 7f2cd5310d277bcddc26836ec7b8dc5686d6c0aa..b78e489759826176d1cedd6a363dfdc2f1a6dd74 100644 --- a/core/modules/node/tests/modules/node_test/node_test.module +++ b/core/modules/node/tests/modules/node_test/node_test.module @@ -20,12 +20,12 @@ function node_test_node_view(array &$build, NodeInterface $node, EntityViewDispl // Add RSS elements and namespaces when building the RSS feed. $node->rss_elements[] = array( 'key' => 'testElement', - 'value' => t('Value of testElement RSS element for node !nid.', array('!nid' => $node->id())), + 'value' => t('Value of testElement RSS element for node @nid.', array('@nid' => $node->id())), ); // Add content that should be displayed only in the RSS feed. $build['extra_feed_content'] = array( - '#markup' => '

' . t('Extra data that should appear only in the RSS feed for node !nid.', array('!nid' => $node->id())) . '

', + '#markup' => '

' . t('Extra data that should appear only in the RSS feed for node @nid.', array('@nid' => $node->id())) . '

', '#weight' => 10, ); } @@ -33,7 +33,7 @@ function node_test_node_view(array &$build, NodeInterface $node, EntityViewDispl if ($view_mode != 'rss') { // Add content that should NOT be displayed in the RSS feed. $build['extra_non_feed_content'] = array( - '#markup' => '

' . t('Extra data that should appear everywhere except the RSS feed for node !nid.', array('!nid' => $node->id())) . '

', + '#markup' => '

' . t('Extra data that should appear everywhere except the RSS feed for node @nid.', array('@nid' => $node->id())) . '

', ); } } diff --git a/core/modules/options/src/Tests/OptionsFieldUITest.php b/core/modules/options/src/Tests/OptionsFieldUITest.php index c0ab0df2577efee6f56622a3f79fd0b3cbb6fca8..d4219c6e3ca39efc009e9a925f842f5c934f981e 100644 --- a/core/modules/options/src/Tests/OptionsFieldUITest.php +++ b/core/modules/options/src/Tests/OptionsFieldUITest.php @@ -326,7 +326,7 @@ function testNodeDisplay() { ); $this->drupalPostForm($this->adminPath, $edit, t('Save field settings')); - $this->assertText(format_string('Updated field !field_name field settings.', array('!field_name' => $this->fieldName)), "The 'On' and 'Off' form fields work for boolean fields."); + $this->assertText(format_string('Updated field @field_name field settings.', array('@field_name' => $this->fieldName)), "The 'On' and 'Off' form fields work for boolean fields."); // Select a default value. $edit = array( diff --git a/core/modules/options/src/Tests/OptionsWidgetsTest.php b/core/modules/options/src/Tests/OptionsWidgetsTest.php index 6bd4714d655546be625352027862568f5d1bda83..f1d2ca327c999a20e62e42e3dcb8d1941f6686f2 100644 --- a/core/modules/options/src/Tests/OptionsWidgetsTest.php +++ b/core/modules/options/src/Tests/OptionsWidgetsTest.php @@ -269,7 +269,7 @@ function testSelectListSingle() { // Submit form: select invalid 'none' option. $edit = array('card_1' => '_none'); $this->drupalPostForm(NULL, $edit, t('Save')); - $this->assertRaw(t('!title field is required.', array('!title' => $field->getName())), 'Cannot save a required field when selecting "none" from the select list.'); + $this->assertRaw(t('@title field is required.', array('@title' => $field->getName())), 'Cannot save a required field when selecting "none" from the select list.'); // Submit form: select first option. $edit = array('card_1' => 0); diff --git a/core/modules/system/src/Tests/Element/PathElementFormTest.php b/core/modules/system/src/Tests/Element/PathElementFormTest.php index 5698951c62bb02d19d15058959027e4fa89b2259..bcbe53483602bb50ee348c56ea0d10df789e2b97 100644 --- a/core/modules/system/src/Tests/Element/PathElementFormTest.php +++ b/core/modules/system/src/Tests/Element/PathElementFormTest.php @@ -184,7 +184,7 @@ public function testPathElement() { $errors = $form_state->getErrors(); // Should be missing 'required_validate' field. $this->assertEqual(count($errors), 1); - $this->assertEqual($errors, array('required_validate' => t('!name field is required.', array('!name' => 'required_validate')))); + $this->assertEqual($errors, array('required_validate' => t('@name field is required.', array('@name' => 'required_validate')))); // Test invalid parameters. $form_state = (new FormState()) diff --git a/core/modules/system/src/Tests/Form/EmailTest.php b/core/modules/system/src/Tests/Form/EmailTest.php index 69e9807c80a2b4750b6738c70d17006fd38a54b3..f409b46257e66de3117589a3f9f682fe497855a8 100644 --- a/core/modules/system/src/Tests/Form/EmailTest.php +++ b/core/modules/system/src/Tests/Form/EmailTest.php @@ -35,7 +35,7 @@ function testFormEmail() { $edit['email_required'] = ' '; $this->drupalPostForm('form-test/email', $edit, 'Submit'); $this->assertRaw(t('The email address %mail is not valid.', array('%mail' => 'invalid'))); - $this->assertRaw(t('!name field is required.', array('!name' => 'Address'))); + $this->assertRaw(t('@name field is required.', array('@name' => 'Address'))); $edit = array(); $edit['email_required'] = ' foo.bar@example.com '; diff --git a/core/modules/system/src/Tests/Form/FormTest.php b/core/modules/system/src/Tests/Form/FormTest.php index e89b78f8a09cfa59dcca0a9faa47f28472d8b144..d3d182645d6fa68160da2ffe8499af0be14ddd15 100644 --- a/core/modules/system/src/Tests/Form/FormTest.php +++ b/core/modules/system/src/Tests/Form/FormTest.php @@ -185,7 +185,7 @@ function testRequiredCheckboxesRadio() { $expected[] = $form[$key]['#form_test_required_error']; } else { - $expected[] = t('!name field is required.', array('!name' => $form[$key]['#title'])); + $expected[] = t('@name field is required.', array('@name' => $form[$key]['#title'])); } } @@ -335,7 +335,7 @@ function testCheckboxProcessing() { // First, try to submit without the required checkbox. $edit = array(); $this->drupalPostForm('form-test/checkbox', $edit, t('Submit')); - $this->assertRaw(t('!name field is required.', array('!name' => 'required_checkbox')), 'A required checkbox is actually mandatory'); + $this->assertRaw(t('@name field is required.', array('@name' => 'required_checkbox')), 'A required checkbox is actually mandatory'); // Now try to submit the form correctly. $values = Json::decode($this->drupalPostForm(NULL, array('required_checkbox' => 1), t('Submit'))); @@ -361,7 +361,6 @@ function testCheckboxProcessing() { */ function testSelect() { $form = \Drupal::formBuilder()->getForm('Drupal\form_test\Form\FormTestSelectForm'); - $error = '!name field is required.'; $this->drupalGet('form-test/select'); // Posting without any values should throw validation errors. @@ -379,7 +378,7 @@ function testSelect() { 'multiple_no_default', ); foreach ($no_errors as $key) { - $this->assertNoText(t('!name field is required.', array('!name' => $form[$key]['#title']))); + $this->assertNoText(t('@name field is required.', array('@name' => $form[$key]['#title']))); } $expected_errors = array( @@ -390,7 +389,7 @@ function testSelect() { 'multiple_no_default_required', ); foreach ($expected_errors as $key) { - $this->assertText(t('!name field is required.', array('!name' => $form[$key]['#title']))); + $this->assertText(t('@name field is required.', array('@name' => $form[$key]['#title']))); } // Post values for required fields. diff --git a/core/modules/system/src/Tests/Form/UrlTest.php b/core/modules/system/src/Tests/Form/UrlTest.php index 494255d15ceb82e5b4dce335ad5cb51a5d863735..67d7a41d7a42f9e785413eeb75297ecfe2a17e4e 100644 --- a/core/modules/system/src/Tests/Form/UrlTest.php +++ b/core/modules/system/src/Tests/Form/UrlTest.php @@ -35,7 +35,7 @@ function testFormUrl() { $edit['url_required'] = ' '; $this->drupalPostForm('form-test/url', $edit, 'Submit'); $this->assertRaw(t('The URL %url is not valid.', array('%url' => 'http://'))); - $this->assertRaw(t('!name field is required.', array('!name' => 'Required URL'))); + $this->assertRaw(t('@name field is required.', array('@name' => 'Required URL'))); $edit = array(); $edit['url'] = "\n"; diff --git a/core/modules/system/src/Tests/Form/ValidationTest.php b/core/modules/system/src/Tests/Form/ValidationTest.php index 74e9583e267eacf3dd51aa076b6583186256fb3b..2bc4867dc90055a3e29104b748637c87b8fe24ad 100644 --- a/core/modules/system/src/Tests/Form/ValidationTest.php +++ b/core/modules/system/src/Tests/Form/ValidationTest.php @@ -118,19 +118,19 @@ function testValidateLimitErrors() { // validated, but the #element_validate handler for the 'test' field // is triggered. $this->drupalPostForm($path, $edit, t('Partial validate')); - $this->assertNoText(t('!name field is required.', array('!name' => 'Title'))); + $this->assertNoText(t('@name field is required.', array('@name' => 'Title'))); $this->assertText('Test element is invalid'); // Edge case of #limit_validation_errors containing numeric indexes: same // thing with the 'Partial validate (numeric index)' button and the // 'test_numeric_index' field. $this->drupalPostForm($path, $edit, t('Partial validate (numeric index)')); - $this->assertNoText(t('!name field is required.', array('!name' => 'Title'))); + $this->assertNoText(t('@name field is required.', array('@name' => 'Title'))); $this->assertText('Test (numeric index) element is invalid'); // Ensure something like 'foobar' isn't considered "inside" 'foo'. $this->drupalPostForm($path, $edit, t('Partial validate (substring)')); - $this->assertNoText(t('!name field is required.', array('!name' => 'Title'))); + $this->assertNoText(t('@name field is required.', array('@name' => 'Title'))); $this->assertText('Test (substring) foo element is invalid'); // Ensure not validated values are not available to submit handlers. @@ -140,7 +140,7 @@ function testValidateLimitErrors() { // Now test full form validation and ensure that the #element_validate // handler is still triggered. $this->drupalPostForm($path, $edit, t('Full validate')); - $this->assertText(t('!name field is required.', array('!name' => 'Title'))); + $this->assertText(t('@name field is required.', array('@name' => 'Title'))); $this->assertText('Test element is invalid'); } @@ -218,7 +218,7 @@ function testCustomRequiredError() { $messages = []; foreach (Element::children($form) as $key) { if (isset($form[$key]['#required_error'])) { - $this->assertNoText(t('!name field is required.', array('!name' => $form[$key]['#title']))); + $this->assertNoText(t('@name field is required.', array('@name' => $form[$key]['#title']))); $messages[] = [ 'title' => $form[$key]['#title'], 'message' => $form[$key]['#required_error'], @@ -226,7 +226,7 @@ function testCustomRequiredError() { ]; } elseif (isset($form[$key]['#form_test_required_error'])) { - $this->assertNoText(t('!name field is required.', array('!name' => $form[$key]['#title']))); + $this->assertNoText(t('@name field is required.', array('@name' => $form[$key]['#title']))); $messages[] = [ 'title' => $form[$key]['#title'], 'message' => $form[$key]['#form_test_required_error'], @@ -236,7 +236,7 @@ function testCustomRequiredError() { elseif (!empty($form[$key]['#required'])) { $messages[] = [ 'title' => $form[$key]['#title'], - 'message' => t('!name field is required.', ['!name' => $form[$key]['#title']]), + 'message' => t('@name field is required.', ['@name' => $form[$key]['#title']]), 'key' => $key, ]; } @@ -254,17 +254,17 @@ function testCustomRequiredError() { $messages = []; foreach (Element::children($form) as $key) { if (isset($form[$key]['#required_error'])) { - $this->assertNoText(t('!name field is required.', array('!name' => $form[$key]['#title']))); + $this->assertNoText(t('@name field is required.', array('@name' => $form[$key]['#title']))); $this->assertNoText($form[$key]['#required_error']); } elseif (isset($form[$key]['#form_test_required_error'])) { - $this->assertNoText(t('!name field is required.', array('!name' => $form[$key]['#title']))); + $this->assertNoText(t('@name field is required.', array('@name' => $form[$key]['#title']))); $this->assertNoText($form[$key]['#form_test_required_error']); } elseif (!empty($form[$key]['#required'])) { $messages[] = [ 'title' => $form[$key]['#title'], - 'message' => t('!name field is required.', ['!name' => $form[$key]['#title']]), + 'message' => t('@name field is required.', ['@name' => $form[$key]['#title']]), 'key' => $key, ]; } diff --git a/core/modules/system/src/Tests/Theme/ThemeTest.php b/core/modules/system/src/Tests/Theme/ThemeTest.php index bab41ad7ed125f283f1b088e7b8888918f0afc1a..4aafc4f1ec5529b786110e5516a841ebf70a16ed 100644 --- a/core/modules/system/src/Tests/Theme/ThemeTest.php +++ b/core/modules/system/src/Tests/Theme/ThemeTest.php @@ -66,7 +66,7 @@ function testThemeDataTypes() { $foos = array('null' => NULL, 'false' => FALSE, 'integer' => 1, 'string' => 'foo', 'empty_string' => ''); foreach ($foos as $type => $example) { $output = \Drupal::theme()->render('theme_test_foo', array('foo' => $example)); - $this->assertTrue($output instanceof SafeStringInterface || is_string($output), format_string('\Drupal::theme() returns an object that implements SafeStringInterface or a string for data type !type.', array('!type' => $type))); + $this->assertTrue($output instanceof SafeStringInterface || is_string($output), format_string('\Drupal::theme() returns an object that implements SafeStringInterface or a string for data type @type.', array('@type' => $type))); if ($output instanceof SafeStringInterface) { $this->assertIdentical((string) $example, $output->__toString()); } diff --git a/core/modules/system/tests/modules/form_test/src/Form/FormTestVerticalTabsForm.php b/core/modules/system/tests/modules/form_test/src/Form/FormTestVerticalTabsForm.php index 2c470687dbe6409c377745491b52593e6ad4de12..a2bac03ab1ff0b0df0d8ddfb84dfb8ed0f9c4c73 100644 --- a/core/modules/system/tests/modules/form_test/src/Form/FormTestVerticalTabsForm.php +++ b/core/modules/system/tests/modules/form_test/src/Form/FormTestVerticalTabsForm.php @@ -33,12 +33,12 @@ public function buildForm(array $form, FormStateInterface $form_state) { for ($i = 1; $i <= $tab_count; $i++) { $form['tab' . $i] = array( '#type' => 'fieldset', - '#title' => t('Tab !num', array('!num' => $i)), + '#title' => t('Tab @num', array('@num' => $i)), '#group' => 'vertical_tabs', '#access' => \Drupal::currentUser()->hasPermission('access vertical_tab_test tabs'), ); $form['tab' . $i]['field' . $i] = array( - '#title' => t('Field !num', array('!num' => $i)), + '#title' => t('Field @num', array('@num' => $i)), '#type' => 'textfield', ); diff --git a/core/modules/taxonomy/src/Tests/LoadMultipleTest.php b/core/modules/taxonomy/src/Tests/LoadMultipleTest.php index f82479296ef505b685f135540df91a6b7f5a895f..5bdba22afb2bdde8b6519ca170b0c5a964e07c8d 100644 --- a/core/modules/taxonomy/src/Tests/LoadMultipleTest.php +++ b/core/modules/taxonomy/src/Tests/LoadMultipleTest.php @@ -38,7 +38,7 @@ function testTaxonomyTermMultipleLoad() { // Load the terms from the vocabulary. $terms = entity_load_multiple_by_properties('taxonomy_term', array('vid' => $vocabulary->id())); $count = count($terms); - $this->assertEqual($count, 5, format_string('Correct number of terms were loaded. !count terms.', array('!count' => $count))); + $this->assertEqual($count, 5, format_string('Correct number of terms were loaded. @count terms.', array('@count' => $count))); // Load the same terms again by tid. $terms2 = Term::loadMultiple(array_keys($terms)); diff --git a/core/modules/user/src/Tests/UserRolesAssignmentTest.php b/core/modules/user/src/Tests/UserRolesAssignmentTest.php index fc074c8a09c52a564f7f5d03c2669f195b0b42f0..60f4eabf145a010a6e7e46cf165b46beb89b86d1 100644 --- a/core/modules/user/src/Tests/UserRolesAssignmentTest.php +++ b/core/modules/user/src/Tests/UserRolesAssignmentTest.php @@ -58,7 +58,7 @@ function testCreateUserWithRole() { "roles[$rid]" => $rid, ); $this->drupalPostForm('admin/people/create', $edit, t('Create new account')); - $this->assertText(t('Created a new user account for !name.', array('!name' => $edit['name']))); + $this->assertText(t('Created a new user account for @name.', array('@name' => $edit['name']))); // Get the newly added user. $account = user_load_by_name($edit['name']); diff --git a/core/modules/user/src/Tests/UserValidationTest.php b/core/modules/user/src/Tests/UserValidationTest.php index f66f4654c7f3f3e7cf70d97c427fd0ff30ff198b..b419103b8eab0cd1ac92cd720a510e0832f5b93f 100644 --- a/core/modules/user/src/Tests/UserValidationTest.php +++ b/core/modules/user/src/Tests/UserValidationTest.php @@ -136,7 +136,7 @@ function testValidation() { $violations = $user->validate(); $this->assertEqual(count($violations), 1, 'E-mail addresses may not be removed'); $this->assertEqual($violations[0]->getPropertyPath(), 'mail'); - $this->assertEqual($violations[0]->getMessage(), t('!name field is required.', array('!name' => $user->getFieldDefinition('mail')->getLabel()))); + $this->assertEqual($violations[0]->getMessage(), t('@name field is required.', array('@name' => $user->getFieldDefinition('mail')->getLabel()))); $user->set('mail', 'someone@example.com'); $user->set('timezone', $this->randomString(33)); diff --git a/core/modules/views/src/Tests/Handler/FieldKernelTest.php b/core/modules/views/src/Tests/Handler/FieldKernelTest.php index 7a4e338e43767535b78ccd31a6fbdceb34aaa00b..cbf65efc4ec2344af106d7641fd83f219e958aec 100644 --- a/core/modules/views/src/Tests/Handler/FieldKernelTest.php +++ b/core/modules/views/src/Tests/Handler/FieldKernelTest.php @@ -242,25 +242,25 @@ public function testFieldTokens() { $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($name_field_0, $row) { return $name_field_0->advancedRender($row); }); - $this->assertEqual($output, $expected_output_0, format_string('Test token replacement: "!token" gave "!output"', [ - '!token' => $name_field_0->options['alter']['text'], - '!output' => $output, + $this->assertEqual($output, $expected_output_0, format_string('Test token replacement: "@token" gave "@output"', [ + '@token' => $name_field_0->options['alter']['text'], + '@output' => $output, ])); $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($name_field_1, $row) { return $name_field_1->advancedRender($row); }); - $this->assertEqual($output, $expected_output_1, format_string('Test token replacement: "!token" gave "!output"', [ - '!token' => $name_field_1->options['alter']['text'], - '!output' => $output, + $this->assertEqual($output, $expected_output_1, format_string('Test token replacement: "@token" gave "@output"', [ + '@token' => $name_field_1->options['alter']['text'], + '@output' => $output, ])); $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($name_field_2, $row) { return $name_field_2->advancedRender($row); }); - $this->assertEqual($output, $expected_output_2, format_string('Test token replacement: "!token" gave "!output"', [ - '!token' => $name_field_2->options['alter']['text'], - '!output' => $output, + $this->assertEqual($output, $expected_output_2, format_string('Test token replacement: "@token" gave "@output"', [ + '@token' => $name_field_2->options['alter']['text'], + '@output' => $output, ])); } @@ -273,10 +273,10 @@ public function testFieldTokens() { $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($job_field, $row) { return $job_field->advancedRender($row); }); - $this->assertSubString($output, $random_text, format_string('Make sure the self token (!token => !value) appears in the output (!output)', [ - '!value' => $random_text, - '!output' => $output, - '!token' => $job_field->options['alter']['text'], + $this->assertSubString($output, $random_text, format_string('Make sure the self token (@token => @value) appears in the output (@output)', [ + '@value' => $random_text, + '@output' => $output, + '@token' => $job_field->options['alter']['text'], ])); // Verify the token format used in D7 and earlier does not get substituted. @@ -287,10 +287,10 @@ public function testFieldTokens() { $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($job_field, $row) { return $job_field->advancedRender($row); }); - $this->assertEqual($output, $old_token, format_string('Make sure the old token style (!token => !value) is not changed in the output (!output)', [ - '!value' => $random_text, - '!output' => $output, - '!token' => $job_field->options['alter']['text'], + $this->assertEqual($output, $old_token, format_string('Make sure the old token style (@token => @value) is not changed in the output (@output)', [ + '@value' => $random_text, + '@output' => $output, + '@token' => $job_field->options['alter']['text'], ])); // Verify HTML tags are allowed in rewrite templates while token @@ -320,9 +320,9 @@ public function testFieldTokens() { $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($job_field, $row) { return $job_field->advancedRender($row); }); - $this->assertEqual($output, $random_text, format_string('Make sure a script tag in the template (!template) is removed, leaving only the replaced token in the output (!output)', [ - '!output' => $output, - '!template' => $rewrite_template, + $this->assertEqual($output, $random_text, format_string('Make sure a script tag in the template (@template) is removed, leaving only the replaced token in the output (@output)', [ + '@output' => $output, + '@template' => $rewrite_template, ])); } diff --git a/core/modules/views/src/Tests/Handler/FieldWebTest.php b/core/modules/views/src/Tests/Handler/FieldWebTest.php index 0435809aef63a252035eb09a5eda6bc508a3c38b..98fe8afd86d1a50e129f7dbdf8c2e3c8a1518dda 100644 --- a/core/modules/views/src/Tests/Handler/FieldWebTest.php +++ b/core/modules/views/src/Tests/Handler/FieldWebTest.php @@ -564,14 +564,14 @@ public function testTextRendering() { $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($name_field, $row) { return $name_field->advancedRender($row); }); - $this->assertSubString($output, $trimmed_name, format_string('Make sure the trimmed output (!trimmed) appears in the rendered output (!output).', array('!trimmed' => $trimmed_name, '!output' => $output))); - $this->assertNotSubString($output, $row->views_test_data_name, format_string("Make sure the untrimmed value (!untrimmed) shouldn't appear in the rendered output (!output).", array('!untrimmed' => $row->views_test_data_name, '!output' => $output))); + $this->assertSubString($output, $trimmed_name, format_string('Make sure the trimmed output (@trimmed) appears in the rendered output (@output).', array('@trimmed' => $trimmed_name, '@output' => $output))); + $this->assertNotSubString($output, $row->views_test_data_name, format_string("Make sure the untrimmed value (@untrimmed) shouldn't appear in the rendered output (@output).", array('@untrimmed' => $row->views_test_data_name, '@output' => $output))); $name_field->options['alter']['max_length'] = 9; $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($name_field, $row) { return $name_field->advancedRender($row); }); - $this->assertSubString($output, $trimmed_name, format_string('Make sure the untrimmed (!untrimmed) output appears in the rendered output (!output).', array('!trimmed' => $trimmed_name, '!output' => $output))); + $this->assertSubString($output, $trimmed_name, format_string('Make sure the untrimmed (@untrimmed) output appears in the rendered output (@output).', array('@trimmed' => $trimmed_name, '@output' => $output))); // Take word_boundary into account for the tests. $name_field->options['alter']['max_length'] = 5; @@ -615,10 +615,10 @@ public function testTextRendering() { }); if ($tuple['trimmed']) { - $this->assertNotSubString($output, $tuple['value'], format_string('The untrimmed value (!untrimmed) should not appear in the trimmed output (!output).', array('!untrimmed' => $tuple['value'], '!output' => $output))); + $this->assertNotSubString($output, $tuple['value'], format_string('The untrimmed value (@untrimmed) should not appear in the trimmed output (@output).', array('@untrimmed' => $tuple['value'], '@output' => $output))); } if (!empty($tuple['trimmed_value'])) { - $this->assertSubString($output, $tuple['trimmed_value'], format_string('The trimmed value (!trimmed) should appear in the trimmed output (!output).', array('!trimmed' => $tuple['trimmed_value'], '!output' => $output))); + $this->assertSubString($output, $tuple['trimmed_value'], format_string('The trimmed value (@trimmed) should appear in the trimmed output (@output).', array('@trimmed' => $tuple['trimmed_value'], '@output' => $output))); } } diff --git a/core/modules/views_ui/src/Tests/ViewEditTest.php b/core/modules/views_ui/src/Tests/ViewEditTest.php index b68dee01690fe5dadcf1fd0ba706ac3c28ebf456..ee5cc601443f19bc8175581803207dc051416dc1 100644 --- a/core/modules/views_ui/src/Tests/ViewEditTest.php +++ b/core/modules/views_ui/src/Tests/ViewEditTest.php @@ -110,7 +110,7 @@ public function testEditFormLanguageOptions() { $this->assertResponse(200); $langcode_url = 'admin/structure/views/nojs/display/' . $view_name . '/' . $display . '/rendering_language'; $this->assertNoLinkByHref($langcode_url); - $this->assertNoLink(t('!type language selected for page', array('!type' => t('Content')))); + $this->assertNoLink(t('@type language selected for page', array('@type' => t('Content')))); $this->assertNoLink(t('Content language of view row')); } @@ -127,12 +127,12 @@ public function testEditFormLanguageOptions() { $langcode_url = 'admin/structure/views/nojs/display/' . $view_name . '/' . $display . '/rendering_language'; if ($view_name == 'test_view') { $this->assertNoLinkByHref($langcode_url); - $this->assertNoLink(t('!type language selected for page', array('!type' => t('Content')))); + $this->assertNoLink(t('@type language selected for page', array('@type' => t('Content')))); $this->assertNoLink(t('Content language of view row')); } else { $this->assertLinkByHref($langcode_url); - $this->assertNoLink(t('!type language selected for page', array('!type' => t('Content')))); + $this->assertNoLink(t('@type language selected for page', array('@type' => t('Content')))); $this->assertLink(t('Content language of view row')); }