You are here

protected function MigrateBlockTest::setUp in Style Switcher 3.0.x

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/Migrate/d7/MigrateBlockTest.php \Drupal\Tests\styleswitcher\Kernel\Migrate\d7\MigrateBlockTest::setUp()

Overrides MigrateDrupal7TestBase::setUp

File

tests/src/Kernel/Migrate/d7/MigrateBlockTest.php, line 23

Class

MigrateBlockTest
Tests migration of the Style Switcher block to a configuration entity.

Namespace

Drupal\Tests\styleswitcher\Kernel\Migrate\d7

Code

protected function setUp() {
  parent::setUp();
  $this
    ->loadFixture(__DIR__ . '/../../../../fixtures/migrate/drupal7.styleswitcher.php');

  // Install the themes used for this test.
  $this->container
    ->get('theme_installer')
    ->install([
    'bartik',
    'seven',
  ]);
  $this
    ->installConfig(static::$modules);

  // Set Bartik and Seven as the default public and admin theme.
  $config = $this
    ->config('system.theme');
  $config
    ->set('default', 'bartik');
  $config
    ->set('admin', 'seven');
  $config
    ->save();
  $this
    ->executeMigrations([
    'd7_styleswitcher_block',
  ]);
  block_rebuild();
}