You are here

public function DataLayerKernelTest::setupMockNodeWithTerm in dataLayer 8

Setup mock node.

2 calls to DataLayerKernelTest::setupMockNodeWithTerm()
DataLayerKernelTest::testDataLayerGetEntityDataReturnsEntityDataArray in tests/src/Kernel/DataLayerKernelTest.php
Test DataLayer Get Entity Terms Returns Entity Data Array.
DataLayerKernelTest::testDataLayerGetEntityTermsReturnsTermArray in tests/src/Kernel/DataLayerKernelTest.php
Test DataLayer Get Entity Terms Returns Term Array.

File

tests/src/Kernel/DataLayerKernelTest.php, line 246

Class

DataLayerKernelTest
Kernel test cases for datalayer module.

Namespace

Drupal\Tests\datalayer\Kernel

Code

public function setupMockNodeWithTerm() {
  $this
    ->setupMockNode();
  $this
    ->setupMockEntityTerm();
  $this->node
    ->set('field_tags', [
    'target_id' => $this->term
      ->id(),
  ]);
}