View source
<?php
namespace Drupal\Tests\commerce_migrate_magento\Kernel\Migrate\magento2;
use Drupal\profile\Entity\ProfileType;
use Drupal\Tests\commerce_migrate\Kernel\CommerceMigrateTestTrait;
use Drupal\Tests\commerce_migrate\Kernel\CsvTestBase;
class ProfileTypeTest extends CsvTestBase {
use CommerceMigrateTestTrait;
public static $modules = [
'action',
'address',
'address',
'commerce',
'commerce',
'commerce_migrate',
'commerce_migrate_magento',
'commerce_order',
'commerce_price',
'commerce_store',
'entity',
'entity_reference_revisions',
'field',
'inline_entity_form',
'migrate_plus',
'options',
'profile',
'profile',
'state_machine',
'system',
'telephone',
'text',
'user',
'views',
];
protected $fixtures = __DIR__ . '/../../../../fixtures/csv/magento2_customer_address_20180618_003449.csv';
protected function setUp() {
parent::setUp();
$this
->installSchema('system', 'sequences');
$this
->installEntitySchema('user');
$this
->installEntitySchema('profile');
$this
->installConfig([
'system',
]);
$this
->executeMigrations([
'magento2_user',
'magento2_profile_type',
]);
}
public function testProfileType() {
$profile_type = ProfileType::load('customer');
$this
->assertInstanceOf(ProfileType::class, $profile_type);
$this
->assertSame('en', $profile_type
->language()
->getId());
$profile_type = ProfileType::load('shipping');
$this
->assertInstanceOf(ProfileType::class, $profile_type);
$this
->assertSame('en', $profile_type
->language()
->getId());
}
}