You are here

public function MigrateCommentVariableEntityDisplayTest::testCommentEntityDisplay in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/comment/src/Tests/Migrate/d6/MigrateCommentVariableEntityDisplayTest.php \Drupal\comment\Tests\Migrate\d6\MigrateCommentVariableEntityDisplayTest::testCommentEntityDisplay()

Tests comment variables migrated into an entity display.

File

core/modules/comment/src/Tests/Migrate/d6/MigrateCommentVariableEntityDisplayTest.php, line 30
Contains \Drupal\comment\Tests\Migrate\d6\MigrateCommentVariableEntityDisplayTest.

Class

MigrateCommentVariableEntityDisplayTest
Upgrade comment variables to entity.display.node.*.default.yml.

Namespace

Drupal\comment\Tests\Migrate\d6

Code

public function testCommentEntityDisplay() {
  foreach ([
    'page',
    'story',
    'article',
  ] as $type) {
    $component = EntityViewDisplay::load('node.' . $type . '.default')
      ->getComponent('comment');
    $this
      ->assertIdentical('hidden', $component['label']);
    $this
      ->assertIdentical('comment_default', $component['type']);
    $this
      ->assertIdentical(20, $component['weight']);
  }
}