You are here

protected function RollbackFieldTest::executeRollback in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/field/tests/src/Kernel/Migrate/d7/RollbackFieldTest.php \Drupal\Tests\field\Kernel\Migrate\d7\RollbackFieldTest::executeRollback()

Executes a single rollback.

Parameters

string|\Drupal\migrate\Plugin\MigrationInterface $migration: The migration to rollback, or its ID.

1 call to RollbackFieldTest::executeRollback()
RollbackFieldTest::testFields in core/modules/field/tests/src/Kernel/Migrate/d7/RollbackFieldTest.php
Tests migrating D7 fields to field_storage_config entities, then rolling back.

File

core/modules/field/tests/src/Kernel/Migrate/d7/RollbackFieldTest.php, line 67

Class

RollbackFieldTest
Migrates and rolls back Drupal 7 fields.

Namespace

Drupal\Tests\field\Kernel\Migrate\d7

Code

protected function executeRollback($migration) {
  if (is_string($migration)) {
    $this->migration = $this
      ->getMigration($migration);
  }
  else {
    $this->migration = $migration;
  }
  (new MigrateExecutable($this->migration, $this))
    ->rollback();
}