X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Flocale%2Ftests%2Fsrc%2FFunctional%2FLocaleTranslationUiTest.php;fp=web%2Fcore%2Fmodules%2Flocale%2Ftests%2Fsrc%2FFunctional%2FLocaleTranslationUiTest.php;h=a51eb876e550a4b0b0f7221b75539a1e60f9974f;hp=e7d28b36834ef2f7f9c4a01d8f754bd1f581b5d5;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php b/web/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php index e7d28b368..a51eb876e 100644 --- a/web/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php +++ b/web/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php @@ -5,7 +5,7 @@ namespace Drupal\Tests\locale\Functional; use Drupal\language\Entity\ConfigurableLanguage; use Drupal\Tests\BrowserTestBase; use Drupal\Core\Language\LanguageInterface; -use Drupal\Component\Utility\SafeMarkup; +use Drupal\Component\Render\FormattableMarkup; /** * Adds a new locale and translates its name. Checks the validation of @@ -259,13 +259,13 @@ class LocaleTranslationUiTest extends BrowserTestBase { $locale_javascripts = \Drupal::state()->get('locale.translation.javascript') ?: []; $js_file = 'public://' . $config->get('javascript.directory') . '/' . $langcode . '_' . $locale_javascripts[$langcode] . '.js'; - $this->assertTrue($result = file_exists($js_file), SafeMarkup::format('JavaScript file created: %file', ['%file' => $result ? $js_file : 'not found'])); + $this->assertTrue($result = file_exists($js_file), new FormattableMarkup('JavaScript file created: %file', ['%file' => $result ? $js_file : 'not found'])); // Test JavaScript translation rebuilding. file_unmanaged_delete($js_file); - $this->assertTrue($result = !file_exists($js_file), SafeMarkup::format('JavaScript file deleted: %file', ['%file' => $result ? $js_file : 'found'])); + $this->assertTrue($result = !file_exists($js_file), new FormattableMarkup('JavaScript file deleted: %file', ['%file' => $result ? $js_file : 'found'])); _locale_rebuild_js($langcode); - $this->assertTrue($result = file_exists($js_file), SafeMarkup::format('JavaScript file rebuilt: %file', ['%file' => $result ? $js_file : 'not found'])); + $this->assertTrue($result = file_exists($js_file), new FormattableMarkup('JavaScript file rebuilt: %file', ['%file' => $result ? $js_file : 'not found'])); } /**