You are here

protected function NodeTest::setUp in Commerce Migrate 3.1.x

Same name in this branch
  1. 3.1.x modules/ubercart/tests/src/Kernel/Migrate/uc6/NodeTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6\NodeTest::setUp()
  2. 3.1.x modules/commerce/tests/src/Kernel/Migrate/commerce1/NodeTest.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1\NodeTest::setUp()
Same name and namespace in other branches
  1. 8.2 modules/commerce/tests/src/Kernel/Migrate/commerce1/NodeTest.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1\NodeTest::setUp()
  2. 3.0.x modules/commerce/tests/src/Kernel/Migrate/commerce1/NodeTest.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1\NodeTest::setUp()

Overrides MigrateDrupal7TestBase::setUp

File

modules/commerce/tests/src/Kernel/Migrate/commerce1/NodeTest.php, line 46

Class

NodeTest
Tests node migration.

Namespace

Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installEntitySchema('comment');
  $this
    ->installEntitySchema('taxonomy_term');
  $this
    ->installSchema('comment', [
    'comment_entity_statistics',
  ]);
  $this
    ->installSchema('node', [
    'node_access',
  ]);
  $this
    ->installEntitySchema('taxonomy_term');
  $this
    ->installEntitySchema('commerce_product_attribute_value');
  $this
    ->migrateFiles();
  $this
    ->migrateUsers();
  $this
    ->migrateFields();
  $this
    ->migrateTaxonomyTerms();
  $this
    ->migrateProducts();
  $this
    ->executeMigrations([
    'd7_node',
  ]);
  $this->nodeStorage = $this->container
    ->get('entity_type.manager')
    ->getStorage('node');
}