protected function PagerTest::createTranslation in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/tests/src/Functional/Plugin/PagerTest.php \Drupal\Tests\views\Functional\Plugin\PagerTest::createTranslation()
- 9 core/modules/views/tests/src/Functional/Plugin/PagerTest.php \Drupal\Tests\views\Functional\Plugin\PagerTest::createTranslation()
Creates single translation for source string.
File
- core/modules/ views/ tests/ src/ Functional/ Plugin/ PagerTest.php, line 541 
Class
- PagerTest
- Tests the pluggable pager system.
Namespace
Drupal\Tests\views\Functional\PluginCode
protected function createTranslation($source, $translation, $langcode) {
  $values = [
    'lid' => $source->lid,
    'language' => $langcode,
    'translation' => $translation,
  ];
  return $this->localeStorage
    ->createTranslation($values)
    ->save();
}