X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcomment%2Ftests%2Fsrc%2FKernel%2FMigrate%2Fd7%2FMigrateCommentEntityDisplayTest.php;h=aeb1e923acb6f09568dc9a86350a9cdecaa269c8;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=871765b83417f05b4c87b82c94b216fa0cbb846a;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityDisplayTest.php b/web/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityDisplayTest.php index 871765b83..aeb1e923a 100644 --- a/web/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityDisplayTest.php +++ b/web/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityDisplayTest.php @@ -6,12 +6,16 @@ use Drupal\Core\Entity\Entity\EntityViewDisplay; 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']; /** @@ -19,7 +23,7 @@ class MigrateCommentEntityDisplayTest extends MigrateDrupal7TestBase { */ protected function setUp() { parent::setUp(); - $this->installConfig(static::$modules); + $this->installConfig(['comment', 'node']); $this->executeMigrations([ 'd7_node_type', 'd7_comment_type', @@ -30,7 +34,7 @@ class MigrateCommentEntityDisplayTest extends MigrateDrupal7TestBase { } /** - * Asserts a display entity. + * Asserts various aspects of a comment component in an entity view display. * * @param string $id * The entity ID. @@ -39,10 +43,10 @@ class MigrateCommentEntityDisplayTest extends MigrateDrupal7TestBase { */ 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']); } /** @@ -53,7 +57,7 @@ class MigrateCommentEntityDisplayTest extends MigrateDrupal7TestBase { $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'); }