X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fconfig_translation%2Ftests%2Fsrc%2FFunctional%2FConfigTranslationUiTest.php;h=64fde483e0086589b1f4e52a6dade74af6641998;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=1d8d859588c0cb33be51a2ba2a96b247b32c99b8;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website diff --git a/web/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php b/web/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php index 1d8d85958..64fde483e 100644 --- a/web/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php +++ b/web/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php @@ -4,8 +4,7 @@ namespace Drupal\Tests\config_translation\Functional; use Behat\Mink\Element\NodeElement; use Drupal\Component\Utility\Html; -use Drupal\Component\Utility\SafeMarkup; -use Drupal\Component\Utility\Unicode; +use Drupal\Component\Render\FormattableMarkup; use Drupal\Core\Language\Language; use Drupal\Core\Language\LanguageInterface; use Drupal\Core\Test\AssertMailTrait; @@ -404,7 +403,7 @@ class ConfigTranslationUiTest extends BrowserTestBase { // Test that delete links work and operations perform properly. foreach ($this->langcodes as $langcode) { - $replacements = ['%label' => t('@label @entity_type', ['@label' => $label, '@entity_type' => Unicode::strtolower(t('Contact form'))]), '@language' => \Drupal::languageManager()->getLanguage($langcode)->getName()]; + $replacements = ['%label' => t('@label @entity_type', ['@label' => $label, '@entity_type' => mb_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)); @@ -808,6 +807,7 @@ class ConfigTranslationUiTest extends BrowserTestBase { // tests. $this->config('locale.settings') ->set('translation.import_enabled', TRUE) + ->set('translation.use_source', LOCALE_TRANSLATION_USE_SOURCE_LOCAL) ->save(); $this->drupalLogin($this->adminUser); @@ -907,7 +907,7 @@ class ConfigTranslationUiTest extends BrowserTestBase { $expected = [ 'kitten', 'llama', - 'elephant' + 'elephant', ]; $actual = $config_factory ->getEditable('config_translation_test.content') @@ -1151,17 +1151,17 @@ class ConfigTranslationUiTest extends BrowserTestBase { ':id' => $id, ]); $textarea = reset($textarea); - $this->assertTrue($textarea instanceof NodeElement, SafeMarkup::format('Disabled field @id exists.', [ + $this->assertTrue($textarea instanceof NodeElement, new FormattableMarkup('Disabled field @id exists.', [ '@id' => $id, ])); $expected = 'This field has been disabled because you do not have sufficient permissions to edit it.'; - $this->assertEqual($textarea->getText(), $expected, SafeMarkup::format('Disabled textarea @id hides text in an inaccessible text format.', [ + $this->assertEqual($textarea->getText(), $expected, new FormattableMarkup('Disabled textarea @id hides text in an inaccessible text format.', [ '@id' => $id, ])); // Make sure the text format select is not shown. $select_id = str_replace('value', 'format--2', $id); $select = $this->xpath('//select[@id=:id]', [':id' => $select_id]); - return $this->assertFalse($select, SafeMarkup::format('Field @id does not exist.', [ + return $this->assertFalse($select, new FormattableMarkup('Field @id does not exist.', [ '@id' => $id, ])); }