/** * {@inheritdoc} */ function setUp() { parent::setUp(); $this->langcode = 'de'; $this->context = 'default'; file_unmanaged_copy(drupal_get_path('module', 'tmgmt_locale') . '/tests/test.de.po', 'translations://', FILE_EXISTS_REPLACE); $file = new \stdClass(); $file->uri = \Drupal::service('file_system')->realpath(drupal_get_path('module', 'tmgmt_locale') . '/tests/test.xx.po'); $file->langcode = $this->langcode; Gettext::fileToDatabase($file, array()); $this->addLanguage($this->langcode); $this->addLanguage('gsw-berne'); }
/** * {@inheritdoc} */ function setUp() { parent::setUp(); $this->langcode = 'de'; $this->context = 'default'; \Drupal::service('router.builder')->rebuild(); $this->installSchema('locale', array('locales_source', 'locales_target')); file_unmanaged_copy(drupal_get_path('module', 'tmgmt_locale') . '/tests/test.de.po', 'translations://', FILE_EXISTS_REPLACE); $file = new \stdClass(); $file->uri = \Drupal::service('file_system')->realpath(drupal_get_path('module', 'tmgmt_locale') . '/tests/test.xx.po'); $file->langcode = $this->langcode; Gettext::fileToDatabase($file, array()); $this->addLanguage('es'); }