You are here

public function FieldWidgetSettingsTest::testWidgetSettings in Commerce Migrate 3.0.x

Same name in this branch
  1. 3.0.x modules/ubercart/tests/src/Kernel/Migrate/uc7/FieldWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\FieldWidgetSettingsTest::testWidgetSettings()
  2. 3.0.x modules/ubercart/tests/src/Kernel/Migrate/uc6/FieldWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6\FieldWidgetSettingsTest::testWidgetSettings()
Same name and namespace in other branches
  1. 8.2 modules/ubercart/tests/src/Kernel/Migrate/uc7/FieldWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\FieldWidgetSettingsTest::testWidgetSettings()
  2. 3.1.x modules/ubercart/tests/src/Kernel/Migrate/uc7/FieldWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\FieldWidgetSettingsTest::testWidgetSettings()

Test that commerce_product settings are created.

File

modules/ubercart/tests/src/Kernel/Migrate/uc7/FieldWidgetSettingsTest.php, line 87

Class

FieldWidgetSettingsTest
Tests migration of Ubercart 7 field widget settings.

Namespace

Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7

Code

public function testWidgetSettings() {
  $this
    ->assertEntity('node.page.default', 'node', 'page');
  $this
    ->assertComponent('node.page.default', 'body', 'text_textarea_with_summary', -4);
  $this
    ->assertComponent('node.page.default', 'field_number', 'number', -3);
  $this
    ->assertEntity('node.article.default', 'node', 'article');
  $this
    ->assertComponent('node.article.default', 'field_image', 'image_image', -1);
  $this
    ->assertComponent('node.article.default', 'field_tags', 'entity_reference_autocomplete', -4);
  $this
    ->assertEntity('commerce_product.default.default', 'commerce_product', 'default');
  $this
    ->assertEntity('commerce_product.product.default', 'commerce_product', 'product');
  $this
    ->assertComponent('commerce_product.product.default', 'field_sustainability', 'string_textfield', 1);
  $this
    ->assertComponent('commerce_product.product.default', 'taxonomy_catalog', 'options_select', -2);
  $this
    ->assertComponent('commerce_product.product.default', 'uc_product_image', 'image_image', -3);
  $this
    ->assertEntity('taxonomy_term.catalog.default', 'taxonomy_term', 'catalog');
  $this
    ->assertComponent('taxonomy_term.catalog.default', 'uc_catalog_image', 'image_image', 1);
}