You are here

public function EntityLoadHelperTest::testCategorizeAttributesAlwaysReturnsThreeKeys in YAML Content 8

Test categorizeAttributes always returns three attribute categories.

@covers ::categorizeAttributes @covers ::identifyAttributeType

@dataProvider attributeCategorizationProvider

File

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

Class

EntityLoadHelperTest
Test functionality of the EntityLoadHelper class.

Namespace

Drupal\Tests\yaml_content\Unit\EntityLoadHelper

Code

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

  // Execute the method.
  $actual = $this->loadHelper
    ->categorizeAttributes($entity_type, $content);

  // Confirm the returned keys.
  $this
    ->assertSame(array_keys($expected), array_keys($actual), 'categorizeAttributes method did not return the expected keys.');
}