ProductVariationTypeTest.php in Commerce Migrate 3.1.x
Same filename in this branch
- 3.1.x modules/shopify/tests/src/Kernel/Migrate/ProductVariationTypeTest.php
- 3.1.x modules/magento/tests/src/Kernel/Migrate/magento2/ProductVariationTypeTest.php
- 3.1.x modules/ubercart/tests/src/Kernel/Migrate/uc7/ProductVariationTypeTest.php
- 3.1.x modules/ubercart/tests/src/Kernel/Migrate/uc6/ProductVariationTypeTest.php
- 3.1.x modules/commerce/tests/src/Kernel/Migrate/commerce1/ProductVariationTypeTest.php
- 3.1.x modules/ubercart/tests/src/Kernel/Plugin/migrate/source/uc7/ProductVariationTypeTest.php
- 3.1.x modules/ubercart/tests/src/Kernel/Plugin/migrate/source/uc6/ProductVariationTypeTest.php
Same filename and directory in other branches
File
modules/ubercart/tests/src/Kernel/Migrate/uc7/ProductVariationTypeTest.phpView source
<?php
namespace Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7;
use Drupal\Tests\commerce_migrate\Kernel\CommerceMigrateTestTrait;
/**
* Tests product variation type migration.
*
* @requires commerce_shipping
* @requires physical
*
* @group commerce_migrate
* @group commerce_migrate_uc7
*/
class ProductVariationTypeTest extends Ubercart7TestBase {
use CommerceMigrateTestTrait;
/**
* {@inheritdoc}
*/
protected static $modules = [
'commerce_migrate_ubercart',
'commerce_order',
'commerce_price',
'commerce_product',
'commerce_shipping',
'commerce_store',
'commerce_store',
'node',
'path',
'physical',
'profile',
'state_machine',
'text',
];
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
$this
->installEntitySchema('view');
$this
->installEntitySchema('commerce_product_variation');
$this
->executeMigration('uc7_product_variation_type');
}
/**
* Test product variation type migration from Ubercart 7 to Commerce 2.
*/
public function testProductVariationType() {
$type = [
'id' => 'product',
'label' => 'Product',
'order_item_type_id' => 'default',
'is_title_generated' => FALSE,
'traits' => [
'purchasable_entity_dimensions',
'purchasable_entity_shippable',
],
];
$this
->assertProductVariationTypeEntity($type['id'], $type['label'], $type['order_item_type_id'], $type['is_title_generated'], $type['traits']);
$type = [
'id' => 'entertainment',
'label' => 'Entertainment',
'order_item_type_id' => 'default',
'is_title_generated' => FALSE,
'traits' => [],
];
$this
->assertProductVariationTypeEntity($type['id'], $type['label'], $type['order_item_type_id'], $type['is_title_generated'], $type['traits']);
}
}
Classes
Name | Description |
---|---|
ProductVariationTypeTest | Tests product variation type migration. |