public function MigrateUploadEntityFormDisplayTest::testUploadEntityFormDisplay in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/file/src/Tests/Migrate/d6/MigrateUploadEntityFormDisplayTest.php \Drupal\file\Tests\Migrate\d6\MigrateUploadEntityFormDisplayTest::testUploadEntityFormDisplay()
Tests the Drupal 6 upload settings to Drupal 8 entity form display migration.
File
- core/
modules/ file/ src/ Tests/ Migrate/ d6/ MigrateUploadEntityFormDisplayTest.php, line 33 - Contains \Drupal\file\Tests\Migrate\d6\MigrateUploadEntityFormDisplayTest.
Class
- MigrateUploadEntityFormDisplayTest
- Upload form entity display.
Namespace
Drupal\file\Tests\Migrate\d6Code
public function testUploadEntityFormDisplay() {
$display = EntityFormDisplay::load('node.page.default');
$component = $display
->getComponent('upload');
$this
->assertIdentical('file_generic', $component['type']);
$display = EntityFormDisplay::load('node.story.default');
$component = $display
->getComponent('upload');
$this
->assertIdentical('file_generic', $component['type']);
// Assure this doesn't exist.
$display = EntityFormDisplay::load('node.article.default');
$component = $display
->getComponent('upload');
$this
->assertTrue(is_null($component));
$this
->assertIdentical(array(
'node',
'page',
'default',
'upload',
), Migration::load('d6_upload_entity_form_display')
->getIdMap()
->lookupDestinationID(array(
'page',
)));
}