OrderFieldTest.php in Commerce Migrate 3.1.x
File
modules/ubercart/tests/src/Kernel/Migrate/uc7/OrderFieldTest.php
View source
<?php
namespace Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7;
use Drupal\field\Entity\FieldStorageConfig;
class OrderFieldTest extends Ubercart7TestBase {
protected static $modules = [
'commerce_order',
'commerce_price',
'commerce_product',
'commerce_store',
'migrate_plus',
'node',
'path',
'profile',
'state_machine',
'telephone',
'text',
'filter',
];
protected function setUp() : void {
parent::setUp();
$this
->installEntitySchema('commerce_order');
$this
->executeMigration('uc_order_field');
}
public function testFields() {
$field_storages = [
'commerce_order.field_order_comments',
'commerce_order.field_order_admin_comments',
'commerce_order.field_order_logs',
];
foreach ($field_storages as $field_storage) {
$storage = FieldStorageConfig::load($field_storage);
$this
->assertInstanceOf(FieldStorageConfig::class, $storage, "{$field_storage} is not an instance of FieldStorageConfig");
}
}
}