You are here

public function LayoutTest::testRenderLayout in Layout Plugin (obsolete, use core's Layout Discovery) 8

Test rendering a layout.

@dataProvider renderLayoutData

File

tests/src/Kernel/LayoutTest.php, line 52

Class

LayoutTest
Tests Layout functionality.

Namespace

Drupal\Tests\layout_plugin\Kernel

Code

public function testRenderLayout($layout_id, $config, $regions, $html) {

  /** @var \Drupal\layout_plugin\Plugin\Layout\LayoutInterface $layout */
  $layout = $this->layoutManager
    ->createInstance($layout_id, $config);
  $built = $layout
    ->build($regions);
  $this
    ->render($built);
  $this
    ->assertRaw($html);
}