ShippingFlatRateTest.php in Commerce Migrate 8.2
Same filename in this branch
- 8.2 modules/ubercart/tests/src/Kernel/Migrate/uc7/ShippingFlatRateTest.php
- 8.2 modules/ubercart/tests/src/Kernel/Migrate/uc6/ShippingFlatRateTest.php
- 8.2 modules/commerce/tests/src/Kernel/Migrate/commerce1/ShippingFlatRateTest.php
- 8.2 modules/ubercart/tests/src/Kernel/Plugin/migrate/source/ShippingFlatRateTest.php
- 8.2 modules/commerce/tests/src/Kernel/Plugin/migrate/source/commerce1/ShippingFlatRateTest.php
Same filename and directory in other branches
File
modules/ubercart/tests/src/Kernel/Migrate/uc6/ShippingFlatRateTest.phpView source
<?php
namespace Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6;
use Drupal\Tests\commerce_migrate\Kernel\CommerceMigrateTestTrait;
/**
* Tests flat rate shipping migration from Uberart 6.
*
* @requires module commerce_shipping
* @requires module physical
*
* @group commerce_migrate
* @group commerce_migrate_uc6
*/
class ShippingFlatRateTest extends Ubercart6TestBase {
use CommerceMigrateTestTrait;
/**
* {@inheritdoc}
*/
public static $modules = [
'commerce_order',
'commerce_price',
'commerce_product',
'commerce_shipping',
'commerce_store',
'path',
'profile',
'physical',
'state_machine',
];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this
->installEntitySchema('commerce_shipping_method');
$this
->executeMigration('uc_shipping_flat_rate');
}
/**
* Test flat rate shipping method migration.
*/
public function testShippingFlatRate() {
$type = [
'id' => '1',
'label' => 'Fluff Ltd',
'rate_amount' => [
'number' => '5.00',
'currency_code' => 'USD',
],
'stores' => [
'1',
],
];
$this
->assertShippingMethod($type);
$type = [
'id' => '2',
'label' => 'Joopleberry Co.',
'rate_amount' => [
'number' => '2.50',
'currency_code' => 'USD',
],
'stores' => [
'1',
],
];
$this
->assertShippingMethod($type);
}
}
Classes
Name | Description |
---|---|
ShippingFlatRateTest | Tests flat rate shipping migration from Uberart 6. |