You are here

protected function CommentEntityFormDisplaySubjectTest::assertSubjectVisible in Commerce Migrate 8.2

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

Asserts that the comment subject field is visible for a node type.

Parameters

string $id: The entity form display ID.

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

File

modules/ubercart/tests/src/Kernel/Migrate/uc7/CommentEntityFormDisplaySubjectTest.php, line 47

Class

CommentEntityFormDisplaySubjectTest
Tests the migration of comment form's subject display from Drupal 7.

Namespace

Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7

Code

protected function assertSubjectVisible($id) {
  $component = EntityFormDisplay::load($id)
    ->getComponent('subject');
  $this
    ->assertInternalType('array', $component);
  $this
    ->assertSame('string_textfield', $component['type']);
  $this
    ->assertSame(10, $component['weight']);
}