You are here

public function EntityLoadHelperTest::testCategorizeAttributesProperlyIdentifiesFields in YAML Content 8

Test categorizeAttributes identifies fields as expected.

@covers ::categorizeAttributes @covers ::identifyAttributeType

@dataProvider attributeCategorizationProvider

File

tests/src/Unit/EntityLoadHelper/EntityLoadHelperTest.php, line 505

Class

EntityLoadHelperTest
Test functionality of the EntityLoadHelper class.

Namespace

Drupal\Tests\yaml_content\Unit\EntityLoadHelper

Code

public function testCategorizeAttributesProperlyIdentifiesFields($entity_type, $content, $expected) {
  $this
    ->setUpCategorizeAttributesTests();

  // Execute the method.
  $actual = $this->loadHelper
    ->categorizeAttributes($entity_type, $content);
  $this
    ->assertArrayEquals($expected['field'], $actual['field']);
}