You are here

protected function WidgetTest::renderEntityForm in Range 8

Renders a given entity form.

Parameters

\Drupal\Core\Entity\FieldableEntityInterface $entity: The entity object with attached fields to render.

1 call to WidgetTest::renderEntityForm()
WidgetTest::testFieldWidget in tests/src/Kernel/Widget/WidgetTest.php
Tests widget.

File

tests/src/Kernel/Widget/WidgetTest.php, line 117

Class

WidgetTest
Tests field widget.

Namespace

Drupal\Tests\range\Kernel\Widget

Code

protected function renderEntityForm(FieldableEntityInterface $entity) {
  $form = $this->container
    ->get('entity.form_builder')
    ->getForm($entity, 'default');
  return $this
    ->render($form);
}