You are here

protected function LingotekNodeBulkFormWithGroupModuleTest::configureUsersPerLingotekTranslation in Lingotek Translation 4.0.x

Same name and namespace in other branches
  1. 3.0.x tests/src/Functional/Form/LingotekNodeBulkFormWithGroupModuleTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekNodeBulkFormWithGroupModuleTest::configureUsersPerLingotekTranslation()
  2. 3.1.x tests/src/Functional/Form/LingotekNodeBulkFormWithGroupModuleTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekNodeBulkFormWithGroupModuleTest::configureUsersPerLingotekTranslation()
  3. 3.2.x tests/src/Functional/Form/LingotekNodeBulkFormWithGroupModuleTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekNodeBulkFormWithGroupModuleTest::configureUsersPerLingotekTranslation()
  4. 3.3.x tests/src/Functional/Form/LingotekNodeBulkFormWithGroupModuleTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekNodeBulkFormWithGroupModuleTest::configureUsersPerLingotekTranslation()
  5. 3.4.x tests/src/Functional/Form/LingotekNodeBulkFormWithGroupModuleTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekNodeBulkFormWithGroupModuleTest::configureUsersPerLingotekTranslation()
  6. 3.5.x tests/src/Functional/Form/LingotekNodeBulkFormWithGroupModuleTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekNodeBulkFormWithGroupModuleTest::configureUsersPerLingotekTranslation()
  7. 3.6.x tests/src/Functional/Form/LingotekNodeBulkFormWithGroupModuleTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekNodeBulkFormWithGroupModuleTest::configureUsersPerLingotekTranslation()
  8. 3.7.x tests/src/Functional/Form/LingotekNodeBulkFormWithGroupModuleTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekNodeBulkFormWithGroupModuleTest::configureUsersPerLingotekTranslation()
  9. 3.8.x tests/src/Functional/Form/LingotekNodeBulkFormWithGroupModuleTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekNodeBulkFormWithGroupModuleTest::configureUsersPerLingotekTranslation()

Configure users per Lingotek translation.

1 call to LingotekNodeBulkFormWithGroupModuleTest::configureUsersPerLingotekTranslation()
LingotekNodeBulkFormWithGroupModuleTest::testGroupFilterDoesntExistForNonNodes in tests/src/Functional/Form/LingotekNodeBulkFormWithGroupModuleTest.php
Tests that the bulk management group filtering doesn't exist for other content entities.

File

tests/src/Functional/Form/LingotekNodeBulkFormWithGroupModuleTest.php, line 162

Class

LingotekNodeBulkFormWithGroupModuleTest
Tests the bulk management form when the group module is enabled.

Namespace

Drupal\Tests\lingotek\Functional\Form

Code

protected function configureUsersPerLingotekTranslation() {

  // Enable translation for the current entity type and ensure the change is
  // picked up.
  ContentLanguageSettings::loadByEntityTypeBundle('user', 'user')
    ->setLanguageAlterable(TRUE)
    ->save();
  \Drupal::service('content_translation.manager')
    ->setEnabled('user', 'user', TRUE);
  drupal_static_reset();
  \Drupal::entityTypeManager()
    ->clearCachedDefinitions();
  $this
    ->applyEntityUpdates();

  // Rebuild the container so that the new languages are picked up by services
  // that hold a list of languages.
  $this
    ->rebuildContainer();
  $edit = [
    'user[user][enabled]' => 1,
    'user[user][profiles]' => 'automatic',
    'user[user][fields][changed]' => 1,
  ];
  $this
    ->drupalPostForm('admin/lingotek/settings', $edit, 'Save', [], 'lingoteksettings-tab-content-form');
}