You are here

protected function MigrateEntityContentValidationTest::runImport in Drupal 8

Same name and namespace in other branches
  1. 9 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

2 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.

File

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

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();
}