public function JSONTextareaWidgetTest::testWidgetSettings in JSON Field 8
Tests that we can save form settings without error.
File
- tests/
src/ Kernel/ JSONTextareaWidgetTest.php, line 17
Class
- JSONTextareaWidgetTest
- @coversDefaultClass \Drupal\json_field\Plugin\Field\FieldWidget\JSONTextareaWidget
Namespace
Drupal\Tests\json_field\KernelCode
public function testWidgetSettings() {
$this
->createTestField();
$entity_form_display = EntityFormDisplay::create([
'targetEntityType' => 'entity_test',
'bundle' => 'entity_test',
'mode' => 'default',
]);
$entity_form_display
->setComponent('test_json_field', [
'type' => 'json_textarea',
]);
$entity_form_display
->save();
}