public function MigrateEventsTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/migrate/src/Tests/MigrateEventsTest.php \Drupal\migrate\Tests\MigrateEventsTest::setUp()
Performs setup tasks before each individual test method is run.
Overrides KernelTestBase::setUp
File
- core/
modules/ migrate/ src/ Tests/ MigrateEventsTest.php, line 46 - Contains \Drupal\migrate\Tests\MigrateEventsTest.
Class
- MigrateEventsTest
- Tests events fired on migrations.
Namespace
Drupal\migrate\TestsCode
public function setUp() {
parent::setUp();
$this->state = \Drupal::state();
\Drupal::service('event_dispatcher')
->addListener(MigrateEvents::MAP_SAVE, array(
$this,
'mapSaveEventRecorder',
));
\Drupal::service('event_dispatcher')
->addListener(MigrateEvents::MAP_DELETE, array(
$this,
'mapDeleteEventRecorder',
));
\Drupal::service('event_dispatcher')
->addListener(MigrateEvents::PRE_IMPORT, array(
$this,
'preImportEventRecorder',
));
\Drupal::service('event_dispatcher')
->addListener(MigrateEvents::POST_IMPORT, array(
$this,
'postImportEventRecorder',
));
\Drupal::service('event_dispatcher')
->addListener(MigrateEvents::PRE_ROW_SAVE, array(
$this,
'preRowSaveEventRecorder',
));
\Drupal::service('event_dispatcher')
->addListener(MigrateEvents::POST_ROW_SAVE, array(
$this,
'postRowSaveEventRecorder',
));
}