818f9b87ea9015cbf5def2e0a0c2a34624c7f545
[yaffs-website] / web / core / modules / comment / tests / src / Kernel / Migrate / d6 / MigrateCommentVariableEntityFormDisplayTest.php
1 <?php
2
3 namespace Drupal\Tests\comment\Kernel\Migrate\d6;
4
5 use Drupal\Core\Entity\Entity\EntityFormDisplay;
6
7 /**
8  * Upgrade comment variables to core.entity_form_display.node.*.default.yml.
9  *
10  * @group migrate_drupal_6
11  */
12 class MigrateCommentVariableEntityFormDisplayTest extends MigrateCommentVariableDisplayBase {
13
14   /**
15    * {@inheritdoc}
16    */
17   public static $modules = ['menu_ui'];
18
19   /**
20    * {@inheritdoc}
21    */
22   protected function setUp() {
23     parent::setUp();
24     $this->executeMigration('d6_comment_entity_form_display');
25   }
26
27   /**
28    * Tests comment variables migrated into an entity display.
29    */
30   public function testCommentEntityFormDisplay() {
31     foreach (['page', 'article', 'story'] as $type) {
32       $component = EntityFormDisplay::load('node.' . $type . '.default')
33         ->getComponent('comment');
34       $this->assertIdentical('comment_default', $component['type']);
35       $this->assertIdentical(20, $component['weight']);
36     }
37   }
38
39 }