comparison core/modules/locale/tests/src/Unit/LocaleLookupTest.php @ 18:af1871eacc83

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:33:08 +0100
parents 7a779792577d
children
comparison
equal deleted inserted replaced
17:129ea1e6d783 18:af1871eacc83
1 <?php 1 <?php
2 2
3 namespace Drupal\Tests\locale\Unit; 3 namespace Drupal\Tests\locale\Unit;
4 4
5 use Drupal\Component\Gettext\PoItem;
5 use Drupal\Core\DependencyInjection\ContainerBuilder; 6 use Drupal\Core\DependencyInjection\ContainerBuilder;
6 use Drupal\Core\StringTranslation\PluralTranslatableMarkup;
7 use Drupal\locale\LocaleLookup; 7 use Drupal\locale\LocaleLookup;
8 use Drupal\Tests\UnitTestCase; 8 use Drupal\Tests\UnitTestCase;
9 use Symfony\Component\HttpFoundation\Request; 9 use Symfony\Component\HttpFoundation\Request;
10 use Symfony\Component\HttpFoundation\RequestStack; 10 use Symfony\Component\HttpFoundation\RequestStack;
11 11
312 */ 312 */
313 public function providerFixOldPluralTranslationProvider() { 313 public function providerFixOldPluralTranslationProvider() {
314 $translations = [ 314 $translations = [
315 'by' => [ 315 'by' => [
316 'word1' => '@count[2] word-by', 316 'word1' => '@count[2] word-by',
317 'word2' => implode(PluralTranslatableMarkup::DELIMITER, ['word-by', '@count[2] word-by']), 317 'word2' => implode(PoItem::DELIMITER, ['word-by', '@count[2] word-by']),
318 ], 318 ],
319 'ru' => [ 319 'ru' => [
320 'word3' => '@count[2] word-ru', 320 'word3' => '@count[2] word-ru',
321 'word4' => implode(PluralTranslatableMarkup::DELIMITER, ['word-ru', '@count[2] word-ru']), 321 'word4' => implode(PoItem::DELIMITER, ['word-ru', '@count[2] word-ru']),
322 ], 322 ],
323 ]; 323 ];
324 return [ 324 return [
325 'no-plural' => [$translations, 'by', 'word1', FALSE], 325 'no-plural' => [$translations, 'by', 'word1', FALSE],
326 'no-plural from other language' => [$translations, 'by', 'word3', FALSE], 326 'no-plural from other language' => [$translations, 'by', 'word3', FALSE],