function MigrateCommentEntityDisplayTest::assertDisplay

Same name in this branch
  1. 11.x core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityDisplayTest.php \Drupal\Tests\comment\Kernel\Migrate\d7\MigrateCommentEntityDisplayTest::assertDisplay()
Same name and namespace in other branches
  1. 9 core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityDisplayTest.php \Drupal\Tests\comment\Kernel\Migrate\d6\MigrateCommentEntityDisplayTest::assertDisplay()
  2. 9 core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityDisplayTest.php \Drupal\Tests\comment\Kernel\Migrate\d7\MigrateCommentEntityDisplayTest::assertDisplay()
  3. 8.9.x core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityDisplayTest.php \Drupal\Tests\comment\Kernel\Migrate\d6\MigrateCommentEntityDisplayTest::assertDisplay()
  4. 8.9.x core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityDisplayTest.php \Drupal\Tests\comment\Kernel\Migrate\d7\MigrateCommentEntityDisplayTest::assertDisplay()
  5. 10 core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityDisplayTest.php \Drupal\Tests\comment\Kernel\Migrate\d6\MigrateCommentEntityDisplayTest::assertDisplay()
  6. 10 core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityDisplayTest.php \Drupal\Tests\comment\Kernel\Migrate\d7\MigrateCommentEntityDisplayTest::assertDisplay()

Asserts various aspects of a comment component in an entity view display.

@internal

Parameters

string $id: The entity ID.

string $component_id: The ID of the display component.

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

File

core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityDisplayTest.php, line 49

Class

MigrateCommentEntityDisplayTest
Tests the migration of comment entity displays from Drupal 6.

Namespace

Drupal\Tests\comment\Kernel\Migrate\d6

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']);
    $this->assertSame('comment_default', $component['type']);
    $this->assertSame(20, $component['weight']);
}

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