View source
<?php
namespace Drupal\Tests\commerce_migrate_magento\Kernel\Migrate\magento2;
use Drupal\Tests\commerce_migrate\Kernel\CommerceMigrateCoreTestTrait;
use Drupal\Tests\commerce_migrate\Kernel\CsvTestBase;
use Drupal\user\Entity\User;
class UserTest extends CsvTestBase {
use CommerceMigrateCoreTestTrait;
public static $modules = [
'commerce_migrate',
'commerce_migrate_magento',
'migrate_plus',
'system',
'user',
];
protected $fixtures = __DIR__ . '/../../../../fixtures/csv/magento2_customer_address_20180618_003449.csv';
protected function setUp() {
parent::setUp();
$this
->installEntitySchema('user');
$this
->installSchema('system', 'sequences');
$this
->installConfig([
'system',
]);
$this
->executeMigration('magento2_user');
}
public function testUser() {
$this
->assertUserEntity(1, 'Veronica Costello', 'roni_cost@example.com', NULL, '0', '', 'en', '', NULL, [
'authenticated',
]);
$this
->assertUserEntity(2, 'Tui Song', 'tui@example.com', NULL, '0', '', 'en', '', NULL, [
'authenticated',
]);
$this
->assertNull(User::load(3));
}
}