function MigrateVocabularyEntityDisplayTest::assertComponent

Same name in other branches
  1. 11.x core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateVocabularyEntityDisplayTest.php \Drupal\Tests\forum\Kernel\Migrate\d6\MigrateVocabularyEntityDisplayTest::assertComponent()

Asserts various aspects of a particular component of a view display.

@internal

Parameters

string $display_id: The view display ID.

string $component_id: The component ID.

string $type: The expected component type (formatter plugin ID).

string $label: The expected label of the component.

int $weight: The expected weight of the component.

1 call to MigrateVocabularyEntityDisplayTest::assertComponent()
MigrateVocabularyEntityDisplayTest::testVocabularyEntityDisplay in core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateVocabularyEntityDisplayTest.php
Tests the Drupal 6 vocabulary-node type association to Drupal 8 migration.

File

core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateVocabularyEntityDisplayTest.php, line 93

Class

MigrateVocabularyEntityDisplayTest
Vocabulary entity display migration.

Namespace

Drupal\Tests\forum\Kernel\Migrate\d6

Code

protected function assertComponent(string $display_id, string $component_id, string $type, string $label, int $weight) : void {
    $component = EntityViewDisplay::load($display_id)->getComponent($component_id);
    $this->assertIsArray($component);
    $this->assertSame($type, $component['type']);
    $this->assertSame($label, $component['label']);
    $this->assertSame($weight, $component['weight']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.