You are here

public function DestinationCategoryTest::testCommerceCategories in Commerce Migrate 8.2

Same name and namespace in other branches
  1. 3.1.x modules/commerce/tests/src/Kernel/Plugin/migrate/DestinationCategoryTest.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Plugin\migrate\DestinationCategoryTest::testCommerceCategories()
  2. 3.0.x modules/commerce/tests/src/Kernel/Plugin/migrate/DestinationCategoryTest.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Plugin\migrate\DestinationCategoryTest::testCommerceCategories()

Tests Commerce 1 migrations are tagged as either Configuration or Content.

File

modules/commerce/tests/src/Kernel/Plugin/migrate/DestinationCategoryTest.php, line 54

Class

DestinationCategoryTest
Tests that all migrations are tagged as either content or configuration.

Namespace

Drupal\Tests\commerce_migrate_commerce\Kernel\Plugin\migrate

Code

public function testCommerceCategories() {
  $dirs = $this->moduleHandler
    ->getModuleDirectories();
  $commerce_migrate_commerce_directory = $dirs['commerce_migrate_commerce'];
  $this
    ->loadFixture("{$commerce_migrate_commerce_directory}/tests/fixtures/ck2.php");
  $migrations = $this->migrationPluginManager
    ->createInstancesByTag('Commerce 1');
  $this
    ->assertArrayHasKey('commerce1_product:tops', $migrations);
  $this
    ->assertCategories($migrations);
}