Version 1
[yaffs-website] / web / core / modules / file / tests / src / Kernel / Migrate / d6 / MigrateUploadFieldTest.php
1 <?php
2
3 namespace Drupal\Tests\file\Kernel\Migrate\d6;
4
5 use Drupal\field\Entity\FieldStorageConfig;
6 use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
7
8 /**
9  * Uploads migration.
10  *
11  * @group migrate_drupal_6
12  */
13 class MigrateUploadFieldTest extends MigrateDrupal6TestBase {
14
15   /**
16    * {@inheritdoc}
17    */
18   public static $modules = ['menu_ui'];
19
20   /**
21    * {@inheritdoc}
22    */
23   protected function setUp() {
24     parent::setUp();
25     $this->migrateFields();
26   }
27
28   /**
29    * Tests the Drupal 6 upload settings to Drupal 8 field migration.
30    */
31   public function testUpload() {
32     $field_storage = FieldStorageConfig::load('node.upload');
33     $this->assertIdentical('node.upload', $field_storage->id());
34     $this->assertIdentical(['node', 'upload'], $this->getMigration('d6_upload_field')->getIdMap()->lookupDestinationID(['']));
35   }
36
37 }