function MigrateBlockContentEntityDisplayTest::assertDisplay

Same name in other branches
  1. 8.9.x core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityDisplayTest.php \Drupal\Tests\block_content\Kernel\Migrate\MigrateBlockContentEntityDisplayTest::assertDisplay()
  2. 10 core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityDisplayTest.php \Drupal\Tests\block_content\Kernel\Migrate\MigrateBlockContentEntityDisplayTest::assertDisplay()
  3. 11.x core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityDisplayTest.php \Drupal\Tests\block_content\Kernel\Migrate\MigrateBlockContentEntityDisplayTest::assertDisplay()

Asserts a display entity.

@internal

Parameters

string $id: The entity ID.

string $component_id: The ID of the display component.

1 call to MigrateBlockContentEntityDisplayTest::assertDisplay()
MigrateBlockContentEntityDisplayTest::testMigration in core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityDisplayTest.php
Tests the migrated display configuration.

File

core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityDisplayTest.php, line 44

Class

MigrateBlockContentEntityDisplayTest
Tests migration of block content body field display configuration.

Namespace

Drupal\Tests\block_content\Kernel\Migrate

Code

protected function assertDisplay(string $id, string $component_id) : void {
    $component = EntityViewDisplay::load($id)->getComponent($component_id);
    $this->assertIsArray($component);
    $this->assertSame('hidden', $component['label']);
}

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