You are here

public function MigrateEventsTest::postImportEventRecorder in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php \Drupal\Tests\migrate\Kernel\MigrateEventsTest::postImportEventRecorder()

Reacts to post-import event.

Parameters

\Drupal\migrate\Event\MigrateImportEvent $event: The migration event.

string $name: The event name.

File

core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php, line 177

Class

MigrateEventsTest
Tests events fired on migrations.

Namespace

Drupal\Tests\migrate\Kernel

Code

public function postImportEventRecorder(MigrateImportEvent $event, $name) {
  $this->state
    ->set('migrate_events_test.post_import_event', [
    'event_name' => $name,
    'migration' => $event
      ->getMigration(),
  ]);
}