You are here

protected function LingotekNodeManageTranslationTabTest::createRelatedTermsForTestingDepth in Lingotek Translation 3.6.x

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

Create some terms with relations so we can test if they are listed or not.

3 calls to LingotekNodeManageTranslationTabTest::createRelatedTermsForTestingDepth()
LingotekNodeManageTranslationTabTest::testEmbeddedContentInSeparateListing in tests/src/Functional/LingotekNodeManageTranslationTabTest.php
Tests that the depth level filter works properly and the embedded content is in a separate table.
LingotekNodeManageTranslationTabTest::testNodeTranslationUsingActions in tests/src/Functional/LingotekNodeManageTranslationTabTest.php
Tests that a node can be translated using the actions on the management page.
LingotekNodeManageTranslationTabTest::testNodeTranslationUsingLinks in tests/src/Functional/LingotekNodeManageTranslationTabTest.php
Tests that a node can be translated using the links on the management page.

File

tests/src/Functional/LingotekNodeManageTranslationTabTest.php, line 936

Class

LingotekNodeManageTranslationTabTest
Tests translating a node using the bulk management form.

Namespace

Drupal\Tests\lingotek\Functional

Code

protected function createRelatedTermsForTestingDepth() {
  $term3 = Term::create([
    'name' => 'Hominid',
    'vid' => $this->vocabulary
      ->id(),
  ]);
  $term3
    ->save();
  $term2 = Term::load(2);
  $term2->field_tags = $term3;
  $term2
    ->save();
  $term4 = Term::create([
    'name' => 'Ruminant',
    'vid' => $this->vocabulary
      ->id(),
  ]);
  $term4
    ->save();
  $term3 = Term::load(3);
  $term3->field_tags = $term4;
  $term3
    ->save();
}