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