comparison core/modules/locale/tests/src/Functional/LocaleConfigTranslationTest.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents c75dbcec494b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
110 $translation = \Drupal::languageManager()->getLanguageConfigOverride($this->langcode, 'core.date_format.medium')->get(); 110 $translation = \Drupal::languageManager()->getLanguageConfigOverride($this->langcode, 'core.date_format.medium')->get();
111 $this->assertEqual($translation['pattern'], 'D', 'Got the right date format pattern after translation.'); 111 $this->assertEqual($translation['pattern'], 'D', 'Got the right date format pattern after translation.');
112 112
113 // Formatting the date 8 / 27 / 1985 @ 13:37 EST with pattern D should 113 // Formatting the date 8 / 27 / 1985 @ 13:37 EST with pattern D should
114 // display "Tue". 114 // display "Tue".
115 $formatted_date = format_date(494015820, $type = 'medium', NULL, 'America/New_York', $this->langcode); 115 $formatted_date = $this->container->get('date.formatter')->format(494015820, $type = 'medium', NULL, 'America/New_York', $this->langcode);
116 $this->assertEqual($formatted_date, 'Tue', 'Got the right formatted date using the date format translation pattern.'); 116 $this->assertEqual($formatted_date, 'Tue', 'Got the right formatted date using the date format translation pattern.');
117 117
118 // Assert strings from image module config are not available. 118 // Assert strings from image module config are not available.
119 $string = $this->storage->findString(['source' => 'Medium (220×220)', 'context' => '', 'type' => 'configuration']); 119 $string = $this->storage->findString(['source' => 'Medium (220×220)', 'context' => '', 'type' => 'configuration']);
120 $this->assertFalse($string, 'Configuration strings have been created upon installation.'); 120 $this->assertFalse($string, 'Configuration strings have been created upon installation.');