You are here

public function DataLayerKernelTest::testDataLayerGetEntityTermsReturnsTermArray in dataLayer 8

Test DataLayer Get Entity Terms Returns Term Array.

File

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

Class

DataLayerKernelTest
Kernel test cases for datalayer module.

Namespace

Drupal\Tests\datalayer\Kernel

Code

public function testDataLayerGetEntityTermsReturnsTermArray() {
  $this
    ->setupMockNodeWithTerm();
  $terms = _datalayer_get_entity_terms($this->node);
  $this
    ->assertEqual([
    'tags' => [
      1 => 'someTag',
    ],
  ], $terms);
}