You are here

public function KeyValueTextareaWidgetTest::testWidgetSettings in Key value field 8

Testing key_value_textarea widget settings.

File

tests/src/Kernel/KeyValueTextareaWidgetTest.php, line 16

Class

KeyValueTextareaWidgetTest
@coversDefaultClass \Drupal\key_value_field\Plugin\Field\FieldWidget\KeyValueTextareaWidget @group key_value_field

Namespace

Drupal\Tests\key_value_field\Kernel

Code

public function testWidgetSettings() {
  $this
    ->createTestField('key_value_long');
  $entity_form_display = EntityFormDisplay::create([
    'targetEntityType' => 'entity_test',
    'bundle' => 'entity_test',
    'mode' => 'default',
  ]);
  $entity_form_display
    ->setComponent('test_key_value_field', [
    'type' => 'key_value_textarea',
  ]);
  $entity_form_display
    ->save();
}