diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslationTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslationTest.php index bb07116..f225e3b 100644 --- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslationTest.php +++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslationTest.php @@ -38,7 +38,7 @@ function testEnglishTranslation() { $this->drupalLogin($admin_user); $this->drupalPost('admin/config/regional/language/edit/en', array('locale_translate_english' => TRUE), t('Save language')); - $this->assertLinkByHref('/admin/config/regional/translate/translate?langcode=en', 0, t('Enabled interface translation to English.')); + $this->assertLinkByHref('/admin/config/regional/translate/translate?langcode=en', 0, 'Enabled interface translation to English.'); } /** diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleUninstallTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleUninstallTest.php index 6a8037f..6c6522d 100644 --- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleUninstallTest.php +++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleUninstallTest.php @@ -112,7 +112,7 @@ function testUninstallProcess() { $this->assertEqual(language(LANGUAGE_TYPE_INTERFACE)->langcode, 'en', format_string('Language after uninstall: %lang', array('%lang' => language(LANGUAGE_TYPE_INTERFACE)->langcode))); // Check JavaScript files deletion. - $this->assertTrue($result = !file_exists($js_file), format_string('JavaScript file deleted: %file', array('%file' => $result ? $js_file : t('found')))); + $this->assertTrue($result = !file_exists($js_file), format_string('JavaScript file deleted: %file', array('%file' => $result ? $js_file : 'found'))); // Check language count. $language_count = variable_get('language_count', 1); @@ -120,13 +120,13 @@ function testUninstallProcess() { // Check language negotiation. require_once DRUPAL_ROOT . '/core/includes/language.inc'; - $this->assertTrue(count(language_types_get_all()) == count(language_types_get_default()), t('Language types reset')); + $this->assertTrue(count(language_types_get_all()) == count(language_types_get_default()), 'Language types reset'); $language_negotiation = language_negotiation_method_get_first(LANGUAGE_TYPE_INTERFACE) == LANGUAGE_NEGOTIATION_SELECTED; - $this->assertTrue($language_negotiation, format_string('Interface language negotiation: %setting', array('%setting' => t($language_negotiation ? 'none' : 'set')))); + $this->assertTrue($language_negotiation, format_string('Interface language negotiation: %setting', array('%setting' => $language_negotiation ? 'none' : 'set'))); $language_negotiation = language_negotiation_method_get_first(LANGUAGE_TYPE_CONTENT) == LANGUAGE_NEGOTIATION_SELECTED; - $this->assertTrue($language_negotiation, format_string('Content language negotiation: %setting', array('%setting' => t($language_negotiation ? 'none' : 'set')))); + $this->assertTrue($language_negotiation, format_string('Content language negotiation: %setting', array('%setting' => $language_negotiation ? 'none' : 'set'))); $language_negotiation = language_negotiation_method_get_first(LANGUAGE_TYPE_URL) == LANGUAGE_NEGOTIATION_SELECTED; - $this->assertTrue($language_negotiation, format_string('URL language negotiation: %setting', array('%setting' => t($language_negotiation ? 'none' : 'set')))); + $this->assertTrue($language_negotiation, format_string('URL language negotiation: %setting', array('%setting' => $language_negotiation ? 'none' : 'set'))); // Check language negotiation method settings. $this->assertFalse(config('language.negotiation')->get('url.source'), 'URL language negotiation method indicator settings cleared.'); diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php index e5dccbd..4a8e760 100644 --- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php +++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php @@ -98,7 +98,7 @@ function addLanguage($langcode) { $edit = array('predefined_langcode' => $langcode); $this->drupalPost('admin/config/regional/language/add', $edit, t('Add language')); drupal_static_reset('language_list'); - $this->assertTrue(language_load($langcode), t('Language %langcode added.', array('%langcode' => $langcode))); + $this->assertTrue(language_load($langcode), format_string('Language %langcode added.', array('%langcode' => $langcode))); } /** @@ -769,8 +769,8 @@ function testEnableCustomLanguage() { // Ensure the translation file is automatically imported when the language // was added. - $this->assertText(t('One translation file imported.'), t('Language file automatically imported.')); - $this->assertText(t('One translation string was skipped because of disallowed or malformed HTML'), t('Language file automatically imported.')); + $this->assertText(t('One translation file imported.'), 'Language file automatically imported.'); + $this->assertText(t('One translation string was skipped because of disallowed or malformed HTML'), 'Language file automatically imported.'); // Ensure the strings were successfully imported. $search = array( @@ -779,7 +779,7 @@ function testEnableCustomLanguage() { 'translation' => 'translated', ); $this->drupalPost('admin/config/regional/translate/translate', $search, t('Filter')); - $this->assertNoText(t('No strings available.'), t('String successfully imported.')); + $this->assertNoText(t('No strings available.'), 'String successfully imported.'); // Ensure the multiline string was imported. $search = array( @@ -788,7 +788,7 @@ function testEnableCustomLanguage() { 'translation' => 'all', ); $this->drupalPost('admin/config/regional/translate/translate', $search, t('Filter')); - $this->assertText('Multiline translation string to make sure that import works with it.', t('String successfully imported.')); + $this->assertText('Multiline translation string to make sure that import works with it.', 'String successfully imported.'); // Ensure 'Allowed HTML source string' was imported but the translation for // 'Another allowed HTML source string' was not because it contains invalid @@ -799,8 +799,8 @@ function testEnableCustomLanguage() { 'translation' => 'all', ); $this->drupalPost('admin/config/regional/translate/translate', $search, t('Filter')); - $this->assertText('Allowed HTML source string', t('String successfully imported.')); - $this->assertNoText('Another allowed HTML source string', t('String with disallowed translation not imported.')); + $this->assertText('Allowed HTML source string', 'String successfully imported.'); + $this->assertNoText('Another allowed HTML source string', 'String with disallowed translation not imported.'); } }