public function ProductTest::testProduct in Commerce Migrate 3.0.x
Same name in this branch
- 3.0.x modules/csv_example/tests/src/Kernel/Migrate/ProductTest.php \Drupal\Tests\commerce_migrate_csv_example\Kernel\Migrate\ProductTest::testProduct()
- 3.0.x modules/magento/tests/src/Kernel/Migrate/magento2/ProductTest.php \Drupal\Tests\commerce_migrate_magento\Kernel\Migrate\magento2\ProductTest::testProduct()
- 3.0.x modules/ubercart/tests/src/Kernel/Migrate/uc7/ProductTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\ProductTest::testProduct()
- 3.0.x modules/ubercart/tests/src/Kernel/Migrate/uc6/ProductTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6\ProductTest::testProduct()
- 3.0.x modules/commerce/tests/src/Kernel/Migrate/commerce1/ProductTest.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1\ProductTest::testProduct()
Same name and namespace in other branches
- 8.2 modules/magento/tests/src/Kernel/Migrate/magento2/ProductTest.php \Drupal\Tests\commerce_migrate_magento\Kernel\Migrate\magento2\ProductTest::testProduct()
- 3.1.x modules/magento/tests/src/Kernel/Migrate/magento2/ProductTest.php \Drupal\Tests\commerce_migrate_magento\Kernel\Migrate\magento2\ProductTest::testProduct()
Test product migration.
File
- modules/
magento/ tests/ src/ Kernel/ Migrate/ magento2/ ProductTest.php, line 80
Class
- ProductTest
- Tests Product migration.
Namespace
Drupal\Tests\commerce_migrate_magento\Kernel\Migrate\magento2Code
public function testProduct() {
$this
->assertProductEntity(1, 'bag', '1', 'Joust Duffle Bag', TRUE, [
'1',
], [
'1',
]);
$variation = [
'id' => 1,
'type' => 'bag',
'uid' => '1',
'sku' => '24-MB01',
'price' => '34.000000',
'currency' => 'USD',
'product_id' => '1',
'title' => 'Joust Duffle Bag',
'order_item_type_id' => 'default',
'created_time' => '1521962400',
'changed_time' => NULL,
'attributes' => NULL,
];
$this
->assertProductVariationEntity($variation);
$this
->assertProductEntity(7, 'gear', '1', 'Sprite Foam Roller', TRUE, [
'1',
], [
'7',
]);
$variation = [
'id' => 7,
'type' => 'gear',
'uid' => '1',
'sku' => '24-WG088',
'price' => '19.000000',
'currency' => 'USD',
'product_id' => '7',
'title' => 'Sprite Foam Roller',
'order_item_type_id' => 'default',
'created_time' => '1521962400',
'changed_time' => NULL,
'attributes' => NULL,
];
$this
->assertProductVariationEntity($variation);
$this
->assertProductEntity(8, 'sprite_stasis_ball', '1', 'Sprite Stasis Ball 55 cm', TRUE, [
'1',
], [
'8',
]);
$variation = [
'id' => 8,
'type' => 'sprite_stasis_ball',
'uid' => '1',
'sku' => '24-WG081-gray',
'price' => '23.000000',
'currency' => 'USD',
'product_id' => '8',
'title' => 'Sprite Stasis Ball 55 cm',
'order_item_type_id' => 'default',
'created_time' => '1521962400',
'changed_time' => NULL,
'attributes' => NULL,
];
$this
->assertProductVariationEntity($variation);
}