You are here

protected function AgreementMigrateTest::setUp in Agreement 3.0.x

Same name in this branch
  1. 3.0.x tests/src/Kernel/d6/AgreementMigrateTest.php \Drupal\Tests\agreement\Kernel\d6\AgreementMigrateTest::setUp()
  2. 3.0.x tests/src/Kernel/d7/AgreementMigrateTest.php \Drupal\Tests\agreement\Kernel\d7\AgreementMigrateTest::setUp()
Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/d7/AgreementMigrateTest.php \Drupal\Tests\agreement\Kernel\d7\AgreementMigrateTest::setUp()

Overrides MigrateDrupal7TestBase::setUp

File

tests/src/Kernel/d7/AgreementMigrateTest.php, line 23

Class

AgreementMigrateTest
Tests agreement migration from 7.x-2.x.

Namespace

Drupal\Tests\agreement\Kernel\d7

Code

protected function setUp() : void {
  parent::setUp();
  $agreementFixture = __DIR__ . '/../../../fixtures/drupal7.php';
  $this
    ->assertNotFalse(realpath($agreementFixture));
  $this
    ->loadFixture($agreementFixture);
  $this
    ->installEntitySchema('user_role');
  $this
    ->installEntitySchema('filter_format');
  $this
    ->installEntitySchema('agreement');
  $this
    ->installSchema('agreement', [
    'agreement',
  ]);
  $this
    ->installConfig('agreement');
  $migrations = [
    'd7_filter_format',
    'd7_user_role',
    'd7_user',
    'agreement_types',
    'd7_agreement',
  ];
  $this
    ->executeMigrations($migrations);
}