public function ProductVariationTest::testProductVariation in Commerce Migrate 3.1.x
Same name in this branch
- 3.1.x modules/csv_example/tests/src/Kernel/Migrate/ProductVariationTest.php \Drupal\Tests\commerce_migrate_csv_example\Kernel\Migrate\ProductVariationTest::testProductVariation()
- 3.1.x modules/shopify/tests/src/Kernel/Migrate/ProductVariationTest.php \Drupal\Tests\commerce_migrate_shopify\Kernel\Migrate\shopify\ProductVariationTest::testProductVariation()
- 3.1.x modules/magento/tests/src/Kernel/Migrate/magento2/ProductVariationTest.php \Drupal\Tests\commerce_migrate_magento\Kernel\Migrate\magento2\ProductVariationTest::testProductVariation()
- 3.1.x modules/ubercart/tests/src/Kernel/Migrate/uc7/ProductVariationTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\ProductVariationTest::testProductVariation()
- 3.1.x modules/ubercart/tests/src/Kernel/Migrate/uc6/ProductVariationTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6\ProductVariationTest::testProductVariation()
- 3.1.x modules/commerce/tests/src/Kernel/Migrate/commerce1/ProductVariationTest.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1\ProductVariationTest::testProductVariation()
Same name and namespace in other branches
- 8.2 modules/ubercart/tests/src/Kernel/Migrate/uc7/ProductVariationTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\ProductVariationTest::testProductVariation()
- 3.0.x modules/ubercart/tests/src/Kernel/Migrate/uc7/ProductVariationTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\ProductVariationTest::testProductVariation()
Test product variation migration.
1 method overrides ProductVariationTest::testProductVariation()
- ProductVariationRollbackTest::testProductVariation in modules/
ubercart/ tests/ src/ Kernel/ Migrate/ uc7/ ProductVariationRollbackTest.php - Test product migration rollback.
File
- modules/
ubercart/ tests/ src/ Kernel/ Migrate/ uc7/ ProductVariationTest.php, line 49
Class
- ProductVariationTest
- Tests Product variation migration.
Namespace
Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7Code
public function testProductVariation() {
$variation = [
'id' => 1,
'type' => 'product',
'uid' => '1',
'sku' => 'drink-001',
'price' => '50.000000',
'currency' => 'USD',
'product_id' => NULL,
'title' => 'Breshtanti ale',
'order_item_type_id' => 'default',
'created_time' => '1493289860',
'changed_time' => NULL,
'attributes' => NULL,
];
$this
->assertProductVariationEntity($variation);
$variation = [
'id' => 2,
'type' => 'product',
'uid' => '1',
'sku' => 'drink-002',
'price' => '100.000000',
'currency' => 'USD',
'product_id' => NULL,
'title' => 'Romulan ale',
'order_item_type_id' => 'default',
'created_time' => '1493326300',
'changed_time' => NULL,
'attributes' => NULL,
];
$this
->assertProductVariationEntity($variation);
$variation = [
'id' => 3,
'type' => 'entertainment',
'uid' => '1',
'sku' => 'Holosuite-001',
'price' => '40.000000',
'currency' => 'USD',
'product_id' => NULL,
'title' => 'Holosuite 1',
'order_item_type_id' => 'default',
'created_time' => '1493326429',
'changed_time' => NULL,
'attributes' => NULL,
];
$this
->assertProductVariationEntity($variation);
}