function LocaleCompareTest::setUp

Setup the test environment.

We use German as default test language. Due to hardcoded configurations in the locale_test module, the language can not be chosen randomly.

Overrides WebTestBase::setUp

File

drupal/core/modules/locale/lib/Drupal/locale/Tests/LocaleCompareTest.php, line 45
Definition of Drupal\locale\Tests\LocaleCompareTest.

Class

LocaleCompareTest
Tests for comparing status of existing project translations with available translations.

Namespace

Drupal\locale\Tests

Code

function setUp() {
  parent::setUp();
  module_load_include('compare.inc', 'locale');
  $admin_user = $this
    ->drupalCreateUser(array(
    'administer site configuration',
    'administer languages',
    'access administration pages',
    'translate interface',
  ));
  $this
    ->drupalLogin($admin_user);
  $this
    ->drupalPost('admin/config/regional/language/add', array(
    'predefined_langcode' => 'de',
  ), t('Add language'));
}