Mercurial > hg > isophonics-drupal-site
diff core/modules/locale/tests/src/Functional/LocaleUpdateTest.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line diff
--- a/core/modules/locale/tests/src/Functional/LocaleUpdateTest.php Thu Feb 28 13:21:36 2019 +0000 +++ b/core/modules/locale/tests/src/Functional/LocaleUpdateTest.php Thu May 09 15:33:08 2019 +0100 @@ -27,25 +27,6 @@ } /** - * Checks if a list of translatable projects gets build. - */ - public function testUpdateProjects() { - module_load_include('compare.inc', 'locale'); - - // Make the test modules look like a normal custom module. i.e. make the - // modules not hidden. locale_test_system_info_alter() modifies the project - // info of the locale_test and locale_test_translate modules. - \Drupal::state()->set('locale.test_system_info_alter', TRUE); - $this->resetAll(); - - // Check if interface translation data is collected from hook_info. - $projects = locale_translation_project_list(); - $this->assertFalse(isset($projects['locale_test_translate']), 'Hidden module not found'); - $this->assertEqual($projects['locale_test']['info']['interface translation server pattern'], 'core/modules/locale/test/test.%language.po', 'Interface translation parameter found in project info.'); - $this->assertEqual($projects['locale_test']['name'], 'locale_test', format_string('%key found in project info.', ['%key' => 'interface translation project'])); - } - - /** * Checks if local or remote translation sources are detected. * * The translation status process by default checks the status of the @@ -136,8 +117,10 @@ // Check the status on the Available translation status page. $this->assertRaw('<label for="edit-langcodes-de" class="visually-hidden">Update German</label>', 'German language found'); $this->assertText('Updates for: Contributed module one, Contributed module two, Custom module one, Locale test', 'Updates found'); - $this->assertText('Contributed module one (' . format_date($this->timestampNew, 'html_date') . ')', 'Updates for Contrib module one'); - $this->assertText('Contributed module two (' . format_date($this->timestampNew, 'html_date') . ')', 'Updates for Contrib module two'); + /** @var \Drupal\Core\Datetime\DateFormatterInterface $date_formatter */ + $date_formatter = $this->container->get('date.formatter'); + $this->assertText('Contributed module one (' . $date_formatter->format($this->timestampNew, 'html_date') . ')', 'Updates for Contrib module one'); + $this->assertText('Contributed module two (' . $date_formatter->format($this->timestampNew, 'html_date') . ')', 'Updates for Contrib module two'); // Execute the translation update. $this->drupalPostForm('admin/reports/translations', [], t('Update translations'));