You are here

public function DestinationCategoryTest::testUbercart7Categories 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::testUbercart7Categories()
  2. 3.0.x modules/ubercart/tests/src/Kernel/Plugin/migrate/DestinationCategoryTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Plugin\migrate\DestinationCategoryTest::testUbercart7Categories()

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

File

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

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 testUbercart7Categories() {
  $dirs = $this->moduleHandler
    ->getModuleDirectories();
  $commerce_migrate_ubercart_directory = $dirs['commerce_migrate_ubercart'];
  $this
    ->loadFixture("{$commerce_migrate_ubercart_directory}/tests/fixtures/uc7.php");
  $migrations = $this->migrationPluginManager
    ->createInstancesByTag('Ubercart');
  $ubercart7_migrations = $this
    ->filterMigrations($migrations, 'Drupal 7');
  $this
    ->assertArrayHasKey('uc7_store', $ubercart7_migrations);
  $this
    ->assertCategories($ubercart7_migrations);
}