You are here

public function LocaleTest::setUp in Entityform block 8

Overrides BrowserTestBase::setUp

File

tests/src/Functional/LocaleTest.php, line 23

Class

LocaleTest
Tests localization aspects of the module.

Namespace

Drupal\Tests\entityform_block\Functional

Code

public function setUp() {
  parent::setUp();
  $file = new \stdClass();
  $file->uri = \Drupal::service('file_system')
    ->realpath(drupal_get_path('module', 'entityform_block') . '/tests/test.de.po');
  $file->langcode = 'de';
  Gettext::fileToDatabase($file, array());
  ConfigurableLanguage::createFromLangcode('de')
    ->save();
  $this
    ->config('system.site')
    ->set('default_langcode', 'de')
    ->save();
}