View source
<?php
namespace Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7;
use Drupal\field\Entity\FieldConfig;
class FieldInstanceTest extends Ubercart7TestBase {
public static $modules = [
'comment',
'commerce_price',
'commerce_product',
'commerce_store',
'image',
'migrate_plus',
'node',
'path',
'taxonomy',
'text',
];
protected function setUp() {
parent::setUp();
$this
->migrateFields();
}
public function testFieldInstanceMigration() {
$fields = [
'commerce_product.product.body',
'commerce_product.product.field_number',
'commerce_product.product.field_sustainability',
'commerce_product.product.taxonomy_catalog',
'commerce_product.product.uc_product_image',
'node.article.body',
'node.article.field_image',
'node.article.field_tags',
'node.page.field_number',
'taxonomy_term.catalog.uc_catalog_image',
];
foreach ($fields as $field) {
$field_config = FieldConfig::load($field);
$this
->assertInstanceOf(FieldConfig::class, $field_config, "{$field} is not an instance of FieldConfig");
}
}
}