X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcomment%2Ftests%2Fsrc%2FKernel%2FMigrate%2Fd7%2FMigrateCommentEntityFormDisplayTest.php;fp=web%2Fcore%2Fmodules%2Fcomment%2Ftests%2Fsrc%2FKernel%2FMigrate%2Fd7%2FMigrateCommentEntityFormDisplayTest.php;h=2f0f6f318c0ad9e9784adf9f80bbcf91d1fcb506;hp=724db6ea456d74a4f418812f0400dbafd0701183;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplayTest.php b/web/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplayTest.php index 724db6ea4..2f0f6f318 100644 --- a/web/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplayTest.php +++ b/web/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentEntityFormDisplayTest.php @@ -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'); } }