public function MigrateNodeTitleLabelTest::testMigration in Drupal 10
Same name and namespace in other branches
- 8 core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php \Drupal\Tests\node\Kernel\Migrate\d7\MigrateNodeTitleLabelTest::testMigration()
- 9 core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php \Drupal\Tests\node\Kernel\Migrate\d7\MigrateNodeTitleLabelTest::testMigration()
Tests migration of node title field overrides.
File
- core/
modules/ node/ tests/ src/ Kernel/ Migrate/ d7/ MigrateNodeTitleLabelTest.php, line 46
Class
- MigrateNodeTitleLabelTest
- Tests migration of the title field label for node types.
Namespace
Drupal\Tests\node\Kernel\Migrate\d7Code
public function testMigration() {
// Forum title labels are overridden to 'Subject'.
$this
->assertEntity('node.forum.title', 'Subject');
// Other content types use the default of 'Title' and are not overridden.
$no_override_node_type = [
'article',
'blog',
'book',
'page',
'test_content_type',
];
foreach ($no_override_node_type as $type) {
$override = BaseFieldOverride::load("node.{$type}.title");
$this
->assertNotInstanceOf(BaseFieldOverride::class, $override);
}
}