diff --git a/core/modules/content_translation/src/Tests/ContentTestTranslationUITest.php b/core/modules/content_translation/tests/src/Functional/ContentTestTranslationUITest.php similarity index 93% rename from core/modules/content_translation/src/Tests/ContentTestTranslationUITest.php rename to core/modules/content_translation/tests/src/Functional/ContentTestTranslationUITest.php index 1688f75fd6..0b1de0b204 100644 --- a/core/modules/content_translation/src/Tests/ContentTestTranslationUITest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTestTranslationUITest.php @@ -1,6 +1,6 @@ drupalGet('admin/reports/status'); $requirement_value = $this->cssSelect("details.system-status-report__entry summary:contains('Entity/field definitions') + div"); - $this->assertEqual(t('Up to date'), trim((string) $requirement_value[0])); + $this->assertEqual(t('Up to date'), trim($requirement_value[0]->getText())); $this->drupalGet('admin/config/regional/content-language'); // The node entity type should not be an option because it has no bundles. diff --git a/core/modules/content_translation/src/Tests/ContentTranslationLanguageChangeTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php similarity index 98% rename from core/modules/content_translation/src/Tests/ContentTranslationLanguageChangeTest.php rename to core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php index 04bd023cde..ae326ef67b 100644 --- a/core/modules/content_translation/src/Tests/ContentTranslationLanguageChangeTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php @@ -1,6 +1,6 @@ xpath('//select[@id="edit-settings-node-article-settings-language-langcode"]/option'); // Compare values inside the option elements with expected values. for ($i = 0; $i < count($elements); $i++) { - $this->assertEqual($elements[$i]->attributes()->{'value'}, $expected_elements[$i]); + $this->assertEqual($elements[$i]->getText(), $expected_elements[$i]); } } diff --git a/core/modules/content_translation/src/Tests/ContentTranslationSyncImageTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php similarity index 98% rename from core/modules/content_translation/src/Tests/ContentTranslationSyncImageTest.php rename to core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php index 30ff32de52..5f7c9fd9b8 100644 --- a/core/modules/content_translation/src/Tests/ContentTranslationSyncImageTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php @@ -1,11 +1,12 @@ $langcode]); $view_url = $entity->url('canonical', ['language' => $language]); $elements = $this->xpath('//table//a[@href=:href]', [':href' => $view_url]); - $this->assertEqual($elements[0]->getText(), $entity->getTranslation($langcode)->label(), new FormattableMarkup('Label correctly shown for %language translation.', ['%language' => $langcode])); + $this->assertEqual($elements[0]->getText(), $entity->getTranslation($langcode)->label(), format_string('Label correctly shown for %language translation.', ['%language' => $langcode])); $edit_path = $entity->url('edit-form', ['language' => $language]); $elements = $this->xpath('//table//ul[@class="dropbutton"]/li/a[@href=:href]', [':href' => $edit_path]); - $this->assertEqual($elements[0]->getText(), t('Edit'), new FormattableMarkup('Edit link correct for %language translation.', ['%language' => $langcode])); + $this->assertEqual($elements[0]->getText(), t('Edit'), format_string('Edit link correct for %language translation.', ['%language' => $langcode])); } } }