function MigrateUploadEntityFormDisplayTest::testUploadEntityFormDisplay
Same name in other branches
- 9 core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityFormDisplayTest.php \Drupal\Tests\file\Kernel\Migrate\d6\MigrateUploadEntityFormDisplayTest::testUploadEntityFormDisplay()
- 8.9.x core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityFormDisplayTest.php \Drupal\Tests\file\Kernel\Migrate\d6\MigrateUploadEntityFormDisplayTest::testUploadEntityFormDisplay()
- 11.x core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityFormDisplayTest.php \Drupal\Tests\file\Kernel\Migrate\d6\MigrateUploadEntityFormDisplayTest::testUploadEntityFormDisplay()
Tests Drupal 6 upload settings to Drupal 8 entity form display migration.
File
-
core/
modules/ file/ tests/ src/ Kernel/ Migrate/ d6/ MigrateUploadEntityFormDisplayTest.php, line 33
Class
- MigrateUploadEntityFormDisplayTest
- Upload form entity display.
Namespace
Drupal\Tests\file\Kernel\Migrate\d6Code
public function testUploadEntityFormDisplay() : void {
$this->executeMigration('d6_upload_entity_form_display');
$display = EntityFormDisplay::load('node.page.default');
$component = $display->getComponent('upload');
$this->assertSame('file_generic', $component['type']);
$display = EntityFormDisplay::load('node.story.default');
$component = $display->getComponent('upload');
$this->assertSame('file_generic', $component['type']);
// Assure this doesn't exist.
$display = EntityFormDisplay::load('node.article.default');
$component = $display->getComponent('upload');
$this->assertNull($component);
$this->assertSame([
[
'node',
'page',
'default',
'upload',
],
], $this->getMigration('d6_upload_entity_form_display')
->getIdMap()
->lookupDestinationIds([
'page',
]));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.