use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
/**
- * Tests migration of comment display configuration.
+ * Tests the migration of comment entity displays from Drupal 7.
*
* @group comment
+ * @group migrate_drupal_7
*/
class MigrateCommentEntityDisplayTest extends MigrateDrupal7TestBase {
+ /**
+ * {@inheritdoc}
+ */
public static $modules = ['node', 'comment', 'text', 'menu_ui'];
/**
*/
protected function setUp() {
parent::setUp();
- $this->installConfig(static::$modules);
+ $this->installConfig(['comment', 'node']);
$this->executeMigrations([
'd7_node_type',
'd7_comment_type',
}
/**
- * Asserts a display entity.
+ * Asserts various aspects of a comment component in an entity view display.
*
* @param string $id
* The entity ID.
*/
protected function assertDisplay($id, $component_id) {
$component = EntityViewDisplay::load($id)->getComponent($component_id);
- $this->assertTrue(is_array($component));
- $this->assertIdentical('hidden', $component['label']);
- $this->assertIdentical('comment_default', $component['type']);
- $this->assertIdentical(20, $component['weight']);
+ $this->assertInternalType('array', $component);
+ $this->assertSame('hidden', $component['label']);
+ $this->assertSame('comment_default', $component['type']);
+ $this->assertSame(20, $component['weight']);
}
/**
$this->assertDisplay('node.article.default', 'comment_node_article');
$this->assertDisplay('node.book.default', 'comment_node_book');
$this->assertDisplay('node.blog.default', 'comment_node_blog');
- $this->assertDisplay('node.forum.default', 'comment_node_forum');
+ $this->assertDisplay('node.forum.default', 'comment_forum');
$this->assertDisplay('node.test_content_type.default', 'comment_node_test_content_type');
}