You are here

public function MigrateFieldInstanceWidgetSettingsTest::testWidgetSettings in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/field/src/Tests/Migrate/d7/MigrateFieldInstanceWidgetSettingsTest.php \Drupal\field\Tests\Migrate\d7\MigrateFieldInstanceWidgetSettingsTest::testWidgetSettings()

Test that migrated view modes can be loaded using D8 APIs.

File

core/modules/field/src/Tests/Migrate/d7/MigrateFieldInstanceWidgetSettingsTest.php, line 99
Contains \Drupal\field\Tests\Migrate\d7\MigrateFieldInstanceWidgetSettingsTest.

Class

MigrateFieldInstanceWidgetSettingsTest
Migrate field widget settings.

Namespace

Drupal\field\Tests\Migrate\d7

Code

public function testWidgetSettings() {
  $this
    ->assertEntity('node.page.default', 'node', 'page');
  $this
    ->assertComponent('node.page.default', 'body', 'text_textarea_with_summary', -4);
  $this
    ->assertEntity('node.article.default', 'node', 'article');
  $this
    ->assertComponent('node.article.default', 'body', 'text_textarea_with_summary', -4);
  $this
    ->assertComponent('node.article.default', 'field_tags', 'entity_reference_autocomplete', -4);
  $this
    ->assertComponent('node.article.default', 'field_image', 'image_image', -1);
  $this
    ->assertEntity('node.blog.default', 'node', 'blog');
  $this
    ->assertComponent('node.blog.default', 'body', 'text_textarea_with_summary', -4);
  $this
    ->assertEntity('node.book.default', 'node', 'book');
  $this
    ->assertComponent('node.book.default', 'body', 'text_textarea_with_summary', -4);
  $this
    ->assertEntity('node.forum.default', 'node', 'forum');
  $this
    ->assertComponent('node.forum.default', 'body', 'text_textarea_with_summary', 1);
  $this
    ->assertComponent('node.forum.default', 'taxonomy_forums', 'options_select', 0);
  $this
    ->assertEntity('node.test_content_type.default', 'node', 'test_content_type');
  $this
    ->assertComponent('node.test_content_type.default', 'field_boolean', 'boolean_checkbox', 1);
  $this
    ->assertComponent('node.test_content_type.default', 'field_date', 'datetime_default', 2);
  $this
    ->assertComponent('node.test_content_type.default', 'field_date_with_end_time', 'datetime_default', 3);
  $this
    ->assertComponent('node.test_content_type.default', 'field_email', 'email_default', 4);
  $this
    ->assertComponent('node.test_content_type.default', 'field_file', 'file_generic', 5);
  $this
    ->assertComponent('node.test_content_type.default', 'field_float', 'number', 7);
  $this
    ->assertComponent('node.test_content_type.default', 'field_images', 'image_image', 8);
  $this
    ->assertComponent('node.test_content_type.default', 'field_integer', 'number', 9);
  $this
    ->assertComponent('node.test_content_type.default', 'field_link', 'link_default', 10);
  $this
    ->assertComponent('node.test_content_type.default', 'field_integer_list', 'options_buttons', 12);
  $this
    ->assertComponent('node.test_content_type.default', 'field_long_text', 'text_textarea_with_summary', 13);
  $this
    ->assertComponent('node.test_content_type.default', 'field_phone', 'telephone_default', 6);
  $this
    ->assertComponent('node.test_content_type.default', 'field_term_reference', 'entity_reference_autocomplete', 14);
  $this
    ->assertComponent('node.test_content_type.default', 'field_text', 'text_textfield', 15);
  $this
    ->assertComponent('node.test_content_type.default', 'field_text_list', 'options_select', 11);
}