function LocaleSourceTest::setUp

Overrides TMGMTKernelTestBase::setUp

File

sources/locale/tests/src/Kernel/LocaleSourceTest.php, line 26

Class

LocaleSourceTest
Basic Locale Source tests.

Namespace

Drupal\Tests\tmgmt_locale\Kernel

Code

function setUp() : void {
  parent::setUp();
  $this->langcode = 'de';
  $this->context = 'default';
  \Drupal::service('router.builder')
    ->rebuild();
  $this
    ->installSchema('locale', array(
    'locales_source',
    'locales_target',
  ));
  $file = new \stdClass();
  $npath = \Drupal::service('extension.list.module')
    ->getPath('tmgmt_locale');
  $file->uri = \Drupal::service('file_system')
    ->realpath($npath . '/tests/test.xx.po');
  $file->langcode = $this->langcode;
  Gettext::fileToDatabase($file, array());
  $this
    ->addLanguage('es');
}