You are here

MigrateUploadFieldTest.php in Zircon Profile 8.0

Same filename and directory in other branches
  1. 8 core/modules/file/src/Tests/Migrate/d6/MigrateUploadFieldTest.php

File

core/modules/file/src/Tests/Migrate/d6/MigrateUploadFieldTest.php
View source
<?php

/**
 * @file
 * Contains \Drupal\file\Tests\Migrate\d6\MigrateUploadFieldTest.
 */
namespace Drupal\file\Tests\Migrate\d6;

use Drupal\field\Entity\FieldStorageConfig;
use Drupal\migrate\Entity\Migration;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;

/**
 * Uploads migration.
 *
 * @group migrate_drupal_6
 */
class MigrateUploadFieldTest extends MigrateDrupal6TestBase {

  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    parent::setUp();
    $this
      ->migrateFields();
  }

  /**
   * Tests the Drupal 6 upload settings to Drupal 8 field migration.
   */
  public function testUpload() {
    $field_storage = FieldStorageConfig::load('node.upload');
    $this
      ->assertIdentical('node.upload', $field_storage
      ->id());
    $this
      ->assertIdentical(array(
      'node',
      'upload',
    ), Migration::load('d6_upload_field')
      ->getIdMap()
      ->lookupDestinationID(array(
      '',
    )));
  }

}

Classes

Namesort descending Description
MigrateUploadFieldTest Uploads migration.