You are here

protected function MigrateCommentEntityFormDisplaySubjectTest::assertSubjectVisible in Drupal 9

Same name in this branch
  1. 9 core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentEntityFormDisplaySubjectTest.php \Drupal\Tests\comment\Kernel\Migrate\d6\MigrateCommentEntityFormDisplaySubjectTest::assertSubjectVisible()
  2. 9 core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplaySubjectTest.php \Drupal\Tests\comment\Kernel\Migrate\d7\MigrateCommentEntityFormDisplaySubjectTest::assertSubjectVisible()
Same name and namespace in other branches
  1. 8 core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplaySubjectTest.php \Drupal\Tests\comment\Kernel\Migrate\d7\MigrateCommentEntityFormDisplaySubjectTest::assertSubjectVisible()
  2. 10 core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplaySubjectTest.php \Drupal\Tests\comment\Kernel\Migrate\d7\MigrateCommentEntityFormDisplaySubjectTest::assertSubjectVisible()

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

Parameters

string $id: The entity form display ID.

1 call to MigrateCommentEntityFormDisplaySubjectTest::assertSubjectVisible()
MigrateCommentEntityFormDisplaySubjectTest::testMigration in core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplaySubjectTest.php
Tests the migrated display configuration.

File

core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplaySubjectTest.php, line 36

Class

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

Namespace

Drupal\Tests\comment\Kernel\Migrate\d7

Code

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