Same name and namespace in other branches
  1. 8.9.x core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadFieldTest.php \Drupal\Tests\file\Kernel\Migrate\d6\MigrateUploadFieldTest
  2. 9 core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadFieldTest.php \Drupal\Tests\file\Kernel\Migrate\d6\MigrateUploadFieldTest

Uploads migration.

@group migrate_drupal_6

Hierarchy

Expanded class hierarchy of MigrateUploadFieldTest

File

core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadFieldTest.php, line 15

Namespace

Drupal\Tests\file\Kernel\Migrate\d6
View source
class MigrateUploadFieldTest extends MigrateDrupal6TestBase {

  /**
   * {@inheritdoc}
   */
  protected static $modules = [
    'menu_ui',
  ];

  /**
   * {@inheritdoc}
   */
  protected function setUp() : void {
    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
      ->assertSame('node.upload', $field_storage
      ->id());
    $this
      ->assertSame([
      [
        'node',
        'upload',
      ],
    ], $this
      ->getMigration('d6_upload_field')
      ->getIdMap()
      ->lookupDestinationIds([
      '',
    ]));
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MigrateDrupal6TestBase::getFixtureFilePath protected function Gets the path to the fixture file. 13
MigrateDrupal6TestBase::migrateContent protected function Executes all content migrations.
MigrateDrupal6TestBase::migrateContentTypes protected function Migrates node types.
MigrateDrupal6TestBase::migrateFields protected function Executes all field migrations.
MigrateDrupal6TestBase::migrateTaxonomy protected function Executes all taxonomy migrations.
MigrateDrupal6TestBase::migrateUsers protected function Executes all user migrations.
MigrateDrupalTestBase::loadFixture protected function Loads a database fixture into the source database connection.
MigrateTestBase::$collectMessages protected property TRUE to collect messages instead of displaying them.
MigrateTestBase::$logger protected property A logger prophecy object. 2
MigrateTestBase::$migrateMessages protected property A two dimensional array of messages.
MigrateTestBase::$migration protected property The primary migration being tested. 1
MigrateTestBase::$sourceDatabase protected property The source database connection.
MigrateTestBase::cleanupMigrateConnection private function Cleans up the test migrate connection.
MigrateTestBase::createMigrationConnection private function Changes the database connection to the prefixed one.
MigrateTestBase::display public function Displays a migrate message. Overrides MigrateMessageInterface::display
MigrateTestBase::executeMigration protected function Executes a single migration.
MigrateTestBase::executeMigrations protected function Executes a set of migrations in dependency order.
MigrateTestBase::getMigration protected function Gets the migration plugin.
MigrateTestBase::mockFailure protected function Records a failure in the map table of a specific migration.
MigrateTestBase::prepareMigration protected function Modify a migration's configuration before executing it.
MigrateTestBase::prepareMigrations protected function Prepare any dependent migrations.
MigrateTestBase::setTestLogger protected function Injects the test logger into the container.
MigrateTestBase::startCollectingMessages public function Start collecting messages and erase previous messages.
MigrateTestBase::stopCollectingMessages public function Stop collecting messages.
MigrateTestBase::tearDown protected function
MigrateUploadFieldTest::$modules protected static property Modules to enable. Overrides MigrateDrupal6TestBase::$modules
MigrateUploadFieldTest::setUp protected function Overrides MigrateDrupal6TestBase::setUp
MigrateUploadFieldTest::testUpload public function Tests the Drupal 6 upload settings to Drupal 8 field migration.
NodeMigrateTypeTestTrait::$tableName public property The migrate_map table name.
NodeMigrateTypeTestTrait::getTableName protected function Gets the migrate_map table name.
NodeMigrateTypeTestTrait::makeNodeMigrateMapTable protected function Create a node migrate_map table.
NodeMigrateTypeTestTrait::nodeMigrateMapTableCount protected function Gets the numbers of complete and classic node migrate_map tables.
NodeMigrateTypeTestTrait::removeNodeMigrateMapTable protected function Remove the node migrate map table.