You are here

protected function LingotekNodeBulkFormWithGroupModuleTest::addGroup in Lingotek Translation 3.4.x

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

Add a group via the UI.

Parameters

string $group_label: The group type label.

$label: The name of the group.

Return value

string The name of the group.

1 call to LingotekNodeBulkFormWithGroupModuleTest::addGroup()
LingotekNodeBulkFormWithGroupModuleTest::configureGroups in tests/src/Functional/Form/LingotekNodeBulkFormWithGroupModuleTest.php
Add some test groups.

File

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

Class

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

Namespace

Drupal\Tests\lingotek\Functional\Form

Code

protected function addGroup($group_label, $label) {
  $this
    ->drupalGet('/admin/group');
  $this
    ->clickLink('Add group');
  $edit = [
    'label[0][value]' => $label,
  ];
  $this
    ->drupalPostForm(NULL, $edit, new FormattableMarkup('Create @group and complete your membership', [
    '@group' => $group_label,
  ]));
  $this
    ->drupalPostForm(NULL, [], 'Save group and membership');
  return $label;
}