You are here

protected function LingotekNodeBulkFormWithGroupModuleTest::relateNodeToGroup in Lingotek Translation 3.3.x

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

Relates a node to a group.

Parameters

int $nid: The node id.

int $gid: The group id.

string $title: The node title.

1 call to LingotekNodeBulkFormWithGroupModuleTest::relateNodeToGroup()
LingotekNodeBulkFormWithGroupModuleTest::testGroupFilter in tests/src/Functional/Form/LingotekNodeBulkFormWithGroupModuleTest.php
Tests that the bulk management group filtering works correctly.

File

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

Class

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

Namespace

Drupal\Tests\lingotek\Functional\Form

Code

protected function relateNodeToGroup($nid, $gid, $title) {
  $this
    ->drupalGet('/group/' . $gid . '/content/add/group_node%3Aarticle');
  $edit = [
    'entity_id[0][target_id]' => $title . ' (' . $nid . ')',
  ];
  $this
    ->drupalPostForm(NULL, $edit, 'Save');
  $this
    ->assertSession()
    ->titleEquals($title . ' | Drupal');
}