function MigrateVocabularyEntityFormDisplayTest::assertComponent

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

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

@internal

Parameters

string $display_id: The form display ID.

string $component_id: The component ID.

string $widget_type: The expected widget type.

int $weight: The expected weight of the component.

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

File

core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateVocabularyEntityFormDisplayTest.php, line 90

Class

MigrateVocabularyEntityFormDisplayTest
Vocabulary entity form display migration.

Namespace

Drupal\Tests\forum\Kernel\Migrate\d6

Code

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

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