function MigrateNodeTitleLabelTest::testMigration
Same name in other branches
- 8.9.x core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php \Drupal\Tests\node\Kernel\Migrate\d7\MigrateNodeTitleLabelTest::testMigration()
- 10 core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php \Drupal\Tests\node\Kernel\Migrate\d7\MigrateNodeTitleLabelTest::testMigration()
- 11.x 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);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.