function MigrateEntityContentValidationTest::runImport

Same name in other branches
  1. 8.9.x core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php \Drupal\Tests\migrate\Kernel\MigrateEntityContentValidationTest::runImport()
  2. 10 core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php \Drupal\Tests\migrate\Kernel\MigrateEntityContentValidationTest::runImport()
  3. 11.x core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php \Drupal\Tests\migrate\Kernel\MigrateEntityContentValidationTest::runImport()

Runs an import of a migration.

Parameters

array $definition: The migration definition.

Throws

\Exception

\Drupal\migrate\MigrateException

3 calls to MigrateEntityContentValidationTest::runImport()
MigrateEntityContentValidationTest::test1 in core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php
Tests an import with invalid data and checks error messages.
MigrateEntityContentValidationTest::test2 in core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php
Tests an import with invalid data and checks error messages.
MigrateEntityContentValidationTest::testEntityOwnerValidation in core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php
Tests validation for entities that are instances of EntityOwnerInterface.

File

core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php, line 269

Class

MigrateEntityContentValidationTest
Tests validation of an entity during migration.

Namespace

Drupal\Tests\migrate\Kernel

Code

protected function runImport(array $definition) {
    // Reset the list of messages from a previous migration.
    $this->messages = [];
    (new MigrateExecutable($this->container
        ->get('plugin.manager.migration')
        ->createStubMigration($definition)))
        ->import();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.