You are here

public function DestinationCategoryTest::testUbercart6Categories in Commerce Migrate 3.1.x

Same name and namespace in other branches
  1. 8.2 modules/ubercart/tests/src/Kernel/Plugin/migrate/DestinationCategoryTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Plugin\migrate\DestinationCategoryTest::testUbercart6Categories()
  2. 3.0.x modules/ubercart/tests/src/Kernel/Plugin/migrate/DestinationCategoryTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Plugin\migrate\DestinationCategoryTest::testUbercart6Categories()

Tests Ubercart 6 migrations are tagged as either Configuration or Content.

File

modules/ubercart/tests/src/Kernel/Plugin/migrate/DestinationCategoryTest.php, line 57

Class

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

Namespace

Drupal\Tests\commerce_migrate_ubercart\Kernel\Plugin\migrate

Code

public function testUbercart6Categories() {
  $dirs = $this->moduleHandler
    ->getModuleDirectories();
  $commerce_migrate_ubercart_directory = $dirs['commerce_migrate_ubercart'];
  $this
    ->loadFixture("{$commerce_migrate_ubercart_directory}/tests/fixtures/uc6.php");
  $migrations = $this->migrationPluginManager
    ->createInstancesByTag('Ubercart');
  $ubercart6_migrations = $this
    ->filterMigrations($migrations, 'Drupal 6');
  $this
    ->assertArrayHasKey('uc6_order', $ubercart6_migrations);
  $this
    ->assertCategories($ubercart6_migrations);
}