You are here

protected function CommentEntityFormDisplayTest::assertDisplay in Commerce Migrate 3.0.x

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

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

Parameters

string $id: The entity ID.

string $component_id: The ID of the form component.

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

File

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

Class

CommentEntityFormDisplayTest
Tests the migration of comment form display from Drupal 7.

Namespace

Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7

Code

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