You are here

protected function InlineEntityFormTest::getRenderedFormAsCrawler in Workbench Access 8

Gets rendered form as crawler.

Return value

\Symfony\Component\DomCrawler\Crawler Crawler wrapping the rendered form.

1 call to InlineEntityFormTest::getRenderedFormAsCrawler()
InlineEntityFormTest::testInlineEntityForm in tests/src/Kernel/InlineEntityFormTest.php
Tests that workbench_access integrates with inline_entity_form.

File

tests/src/Kernel/InlineEntityFormTest.php, line 184

Class

InlineEntityFormTest
Tests workbench access with inline entity form.

Namespace

Drupal\Tests\workbench_access\Kernel

Code

protected function getRenderedFormAsCrawler() {
  $form_builder = $this->container
    ->get('form_builder');
  $form = $form_builder
    ->getForm($this);
  $markup = $this->container
    ->get('renderer')
    ->renderPlain($form);
  return new Crawler((string) $markup);
}