diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleUninstallTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleUninstallTest.php index 63d5d4e..99a1482 100644 --- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleUninstallTest.php +++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleUninstallTest.php @@ -90,7 +90,7 @@ function testUninstallProcess() { $config = config('locale.settings'); $locale_javascripts = \Drupal::state()->get('locale.translation.javascript') ?: array(); $js_file = 'public://' . $config->get('javascript.directory') . '/fr_' . $locale_javascripts['fr'] . '.js'; - $this->assertTrue(file_exists($js_file), String::format('JavaScript file created: %file', array('%file' => $js_file))); + $this->assertTrue($result = file_exists($js_file), String::format('JavaScript file created: %file', array('%file' => $result ? $js_file : 'none'))); // Disable string caching. $config->set('cache_strings', 0)->save(); diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateBase.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateBase.php index ec9e74f..e8562ba 100644 --- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateBase.php +++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateBase.php @@ -8,6 +8,7 @@ namespace Drupal\locale\Tests; use Drupal\simpletest\WebTestBase; +use Drupal\Component\Utility\String; /** * Tests for update translations. @@ -81,7 +82,7 @@ protected 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), String::format('Language %langcode added.', array('%langcode' => $langcode))); } /**