MigrateCommentVariableEntityFormDisplayTest.php 1.08 KB
Newer Older
1 2 3 4
<?php

/**
 * @file
5
 * Contains \Drupal\migrate_drupal\Tests\d6\MigrateCommentVariableEntityFormDisplayTest.
6 7 8 9 10 11 12
 */

namespace Drupal\migrate_drupal\Tests\d6;

/**
 * Tests comment variables migrated into an entity display.
 */
13
class MigrateCommentVariableEntityFormDisplayTest extends MigrateCommentVariableDisplayBase {
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42

  /**
   * The migration to run.
   */
  const MIGRATION = 'd6_comment_entity_form_display';

  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name'  => 'Migrate comment variables to entity form displays,',
      'description'  => 'Upgrade comment variables to entity.form_display.node.*.default.yml',
      'group' => 'Migrate Drupal',
    );
  }

  /**
   * Tests comment variables migrated into an entity display.
   */
  public function testCommentEntityFormDisplay() {
    foreach ($this->types as $type) {
      $component = entity_get_form_display('node', $type, 'default')->getComponent('comment');
      $this->assertEqual($component['type'], 'comment_default');
      $this->assertEqual($component['weight'], 20);
    }
  }

}