You are here

protected function CommentEntityDisplayTest::assertDisplay in Commerce Migrate 8.2

Same name and namespace in other branches
  1. 3.1.x modules/ubercart/tests/src/Kernel/Migrate/uc7/CommentEntityDisplayTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\CommentEntityDisplayTest::assertDisplay()
  2. 3.0.x modules/ubercart/tests/src/Kernel/Migrate/uc7/CommentEntityDisplayTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\CommentEntityDisplayTest::assertDisplay()

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

Parameters

string $id: The entity ID.

string $component_id: The ID of the display component.

1 call to CommentEntityDisplayTest::assertDisplay()
CommentEntityDisplayTest::testMigration in modules/ubercart/tests/src/Kernel/Migrate/uc7/CommentEntityDisplayTest.php
Tests the migrated display configuration.

File

modules/ubercart/tests/src/Kernel/Migrate/uc7/CommentEntityDisplayTest.php, line 46

Class

CommentEntityDisplayTest
Tests the migration of comment entity displays from Drupal 7.

Namespace

Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7

Code

protected function assertDisplay($id, $component_id) {
  $component = EntityViewDisplay::load($id)
    ->getComponent($component_id);
  $this
    ->assertInternalType('array', $component);
  $this
    ->assertSame('hidden', $component['label']);
  $this
    ->assertSame('comment_default', $component['type']);
  $this
    ->assertSame(20, $component['weight']);
}