You are here

public function DataLayerUnitTests::testDataLayerGetEntityTermsReturnsTermArray in dataLayer 7

Test DataLayer Get Entity Terms Returns Term Array.

File

tests/datalayer.unit.test, line 146
Tests the functionality of the DataLayer module.

Class

DataLayerUnitTests
@file Tests the functionality of the DataLayer module.

Code

public function testDataLayerGetEntityTermsReturnsTermArray() {
  $item = $this
    ->setupMockNode();
  $this
    ->setupMockEntityTerms();
  $terms = _datalayer_get_entity_terms('node', 'article', $item['node/1']['map'][1]);
  $this
    ->assertEqual(array(
    'tags' => array(
      1 => 'someTag',
    ),
  ), $terms);
}