2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
$this->assertLinkByHref($prefixes['es'].'/node/add/'.$node->type,0,t('The "add translation" link for %language points to the localized path of the target language.',array('%language'=>$languages['es']->name)));
$this->assertLinkByHref($prefixes['es'].'/node/add/'.$node->type,0,format_string('The "add translation" link for %language points to the localized path of the target language.',array('%language'=>$languages['es']->name)));
// Submit translation in Spanish.
// Submit translation in Spanish.
$node_translation_title=$this->randomName();
$node_translation_title=$this->randomName();
...
@@ -96,13 +96,13 @@ function testContentTranslation() {
...
@@ -96,13 +96,13 @@ function testContentTranslation() {
// Check that the "edit translation" and "view node" links use localized
// Check that the "edit translation" and "view node" links use localized
$this->assertLinkByHref($prefixes['es'].'/node/'.$node_translation->nid.'/edit',0,t('The "edit" link for the translation in %language points to the localized path of the translation language.',array('%language'=>$languages['es']->name)));
$this->assertLinkByHref($prefixes['es'].'/node/'.$node_translation->nid.'/edit',0,format_string('The "edit" link for the translation in %language points to the localized path of the translation language.',array('%language'=>$languages['es']->name)));
$this->assertLinkByHref($prefixes['es'].'/node/'.$node_translation->nid,0,t('The "view" link for the translation in %language points to the localized path of the translation language.',array('%language'=>$languages['es']->name)));
$this->assertLinkByHref($prefixes['es'].'/node/'.$node_translation->nid,0,format_string('The "view" link for the translation in %language points to the localized path of the translation language.',array('%language'=>$languages['es']->name)));
// Attempt to submit a duplicate translation by visiting the node/add page
// Attempt to submit a duplicate translation by visiting the node/add page
$this->assertRaw(t('A translation of %title in %language already exists',array('%title'=>$node_title,'%language'=>$languages['es']->name)),t('Message regarding attempted duplicate translation is displayed.'));
$this->assertRaw(t('A translation of %title in %language already exists',array('%title'=>$node_title,'%language'=>$languages['es']->name)),'Message regarding attempted duplicate translation is displayed.');
// Attempt a resubmission of the form - this emulates using the back button
// Attempt a resubmission of the form - this emulates using the back button
// to return to the page then resubmitting the form without a refresh.
// to return to the page then resubmitting the form without a refresh.
...
@@ -112,7 +112,7 @@ function testContentTranslation() {
...
@@ -112,7 +112,7 @@ function testContentTranslation() {
$this->assertRaw(t('Basic page %title has been updated.',array('%title'=>$node_translation_title)),t('Translated node updated.'));
$this->assertRaw(t('Basic page %title has been updated.',array('%title'=>$node_translation_title)),'Translated node updated.');
// Confirm that language neutral is an option for translators when there are
// Confirm that language neutral is an option for translators when there are
// disabled languages.
// disabled languages.
$this->drupalGet('node/add/page');
$this->drupalGet('node/add/page');
$this->assertFieldByXPath('//select[@name="langcode"]//option',LANGUAGE_NOT_SPECIFIED,t('Language neutral is available in language selection with disabled languages.'));
$this->assertFieldByXPath('//select[@name="langcode"]//option',LANGUAGE_NOT_SPECIFIED,'Language neutral is available in language selection with disabled languages.');
$this->assertRaw(t('Translations of %title',array('%title'=>$node->label())),t('Translation overview page available with only one language enabled.'));
$this->assertRaw(t('Translations of %title',array('%title'=>$node->label())),'Translation overview page available with only one language enabled.');
}
}
/**
/**
...
@@ -258,9 +258,9 @@ function testTranslateOwnContentRole() {
...
@@ -258,9 +258,9 @@ function testTranslateOwnContentRole() {
$this->assertResponse(403,t('User with "translate own content" role can\'t get create translate page'));
$this->assertResponse(403,'User with "translate own content" role can\'t get create translate page');
}
}
/**
/**
...
@@ -320,10 +320,10 @@ function addLanguage($langcode) {
...
@@ -320,10 +320,10 @@ function addLanguage($langcode) {
// Make sure we are not using a stale list.
// Make sure we are not using a stale list.
drupal_static_reset('language_list');
drupal_static_reset('language_list');
$languages=language_list();
$languages=language_list();
$this->assertTrue(array_key_exists($langcode,$languages),t('Language was installed successfully.'));
$this->assertTrue(array_key_exists($langcode,$languages),'Language was installed successfully.');
if(array_key_exists($langcode,$languages)){
if(array_key_exists($langcode,$languages)){
$this->assertRaw(t('The language %language has been created and can now be used.',array('%language'=>$languages[$langcode]->name)),t('Language has been created.'));
$this->assertRaw(t('The language %language has been created and can now be used.',array('%language'=>$languages[$langcode]->name)),'Language has been created.');