FieldInstanceTest.php in Commerce Migrate 3.0.x
File
modules/ubercart/tests/src/Kernel/Migrate/uc6/FieldInstanceTest.php
View source
<?php
namespace Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6;
use Drupal\field\Entity\FieldConfig;
class FieldInstanceTest extends Ubercart6TestBase {
public static $modules = [
'commerce_price',
'commerce_product',
'commerce_store',
'field',
'migrate_plus',
'path',
];
protected function setUp() {
parent::setUp();
$this
->migrateFields();
}
public function testFieldInstanceMigration() {
$field = FieldConfig::load('commerce_product.product.field_image_cache');
$this
->assertInstanceOf(FieldConfig::class, $field);
$field = FieldConfig::load('commerce_product.product.field_image_cache');
$this
->assertInstanceOf(FieldConfig::class, $field);
$field = FieldConfig::load('commerce_product.product.field_integer');
$this
->assertInstanceOf(FieldConfig::class, $field);
$field = FieldConfig::load('commerce_product.product.field_sustain');
$this
->assertInstanceOf(FieldConfig::class, $field);
$field = FieldConfig::load('commerce_product.ship.field_engine');
$this
->assertInstanceOf(FieldConfig::class, $field);
$field = FieldConfig::load('commerce_product.ship.field_image_cache');
$this
->assertInstanceOf(FieldConfig::class, $field);
$field = FieldConfig::load('commerce_product.ship.field_integer');
$this
->assertInstanceOf(FieldConfig::class, $field);
$field = FieldConfig::load('node.page.field_integer');
$this
->assertInstanceOf(FieldConfig::class, $field);
}
}