You are here

protected function LingotekNodeEmbeddingBricksTranslationTest::addBrickField in Lingotek Translation 4.0.x

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

File

tests/src/Functional/LingotekNodeEmbeddingBricksTranslationTest.php, line 183

Class

LingotekNodeEmbeddingBricksTranslationTest
Tests translating a node with multiple locales embedding another entity.

Namespace

Drupal\Tests\lingotek\Functional

Code

protected function addBrickField() {
  $this
    ->drupalGet('admin/structure/types/manage/article/fields');
  $this
    ->clickLink('Add field');
  $edit = [
    'new_storage_type' => 'field_ui:entity_reference:taxonomy_term',
    'label' => 'Brick field',
    'field_name' => 'brick',
  ];
  $this
    ->drupalPostForm(NULL, $edit, 'Save and continue');
  $edit = [
    'cardinality' => -1,
  ];
  $this
    ->drupalPostForm(NULL, $edit, 'Save field settings');
  $edit = [
    'settings[handler_settings][auto_create]' => TRUE,
    'settings[handler_settings][target_bundles][' . $this->vocabulary
      ->id() . ']' => TRUE,
  ];
  $this
    ->drupalPostForm(NULL, $edit, 'Save settings');
}