function RollbackViewModesTest::executeRollback

Same name in other branches
  1. 8.9.x core/modules/field/tests/src/Kernel/Migrate/d7/RollbackViewModesTest.php \Drupal\Tests\field\Kernel\Migrate\d7\RollbackViewModesTest::executeRollback()
  2. 10 core/modules/field/tests/src/Kernel/Migrate/d7/RollbackViewModesTest.php \Drupal\Tests\field\Kernel\Migrate\d7\RollbackViewModesTest::executeRollback()
  3. 11.x core/modules/field/tests/src/Kernel/Migrate/d7/RollbackViewModesTest.php \Drupal\Tests\field\Kernel\Migrate\d7\RollbackViewModesTest::executeRollback()

Executes a single rollback.

Parameters

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

1 call to RollbackViewModesTest::executeRollback()
RollbackViewModesTest::testMigration in core/modules/field/tests/src/Kernel/Migrate/d7/RollbackViewModesTest.php
Tests migrating D7 view modes, then rolling back.

File

core/modules/field/tests/src/Kernel/Migrate/d7/RollbackViewModesTest.php, line 47

Class

RollbackViewModesTest
Migrates and rolls back Drupal 7 view modes.

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

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