Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / comment / tests / src / Kernel / Migrate / d7 / MigrateCommentEntityFormDisplayTest.php
index 724db6ea456d74a4f418812f0400dbafd0701183..2f0f6f318c0ad9e9784adf9f80bbcf91d1fcb506 100644 (file)
@@ -6,12 +6,16 @@ use Drupal\Core\Entity\Entity\EntityFormDisplay;
 use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
 
 /**
- * Tests migration of comment form display configuration.
+ * Tests the migration of comment form display from Drupal 7.
  *
  * @group comment
+ * @group migrate_drupal_7
  */
 class MigrateCommentEntityFormDisplayTest extends MigrateDrupal7TestBase {
 
+  /**
+   * {@inheritdoc}
+   */
   public static $modules = ['node', 'comment', 'text', 'menu_ui'];
 
   /**
@@ -19,7 +23,7 @@ class MigrateCommentEntityFormDisplayTest extends MigrateDrupal7TestBase {
    */
   protected function setUp() {
     parent::setUp();
-    $this->installConfig(static::$modules);
+    $this->installConfig(['comment', 'node']);
     $this->executeMigrations([
       'd7_node_type',
       'd7_comment_type',
@@ -30,30 +34,30 @@ class MigrateCommentEntityFormDisplayTest extends MigrateDrupal7TestBase {
   }
 
   /**
-   * Asserts a display entity.
+   * Asserts various aspects of a comment component in an entity form display.
    *
    * @param string $id
    *   The entity ID.
-   * @param string $component
+   * @param string $component_id
    *   The ID of the form component.
    */
   protected function assertDisplay($id, $component_id) {
     $component = EntityFormDisplay::load($id)->getComponent($component_id);
-    $this->assertTrue(is_array($component));
-    $this->assertIdentical('comment_default', $component['type']);
-    $this->assertIdentical(20, $component['weight']);
+    $this->assertInternalType('array', $component);
+    $this->assertSame('comment_default', $component['type']);
+    $this->assertSame(20, $component['weight']);
   }
 
   /**
    * Tests the migrated display configuration.
    */
   public function testMigration() {
-    $this->assertDisplay('node.page.default', 'comment');
-    $this->assertDisplay('node.article.default', 'comment');
-    $this->assertDisplay('node.book.default', 'comment');
-    $this->assertDisplay('node.blog.default', 'comment');
-    $this->assertDisplay('node.forum.default', 'comment');
-    $this->assertDisplay('node.test_content_type.default', 'comment');
+    $this->assertDisplay('node.page.default', 'comment_node_page');
+    $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_forum');
+    $this->assertDisplay('node.test_content_type.default', 'comment_node_test_content_type');
   }
 
 }