You are here

public function LayoutPluginTest::testResetLayout in Display Suite 8.4

Same name and namespace in other branches
  1. 8.3 tests/src/Functional/LayoutPluginTest.php \Drupal\Tests\ds\Functional\LayoutPluginTest::testResetLayout()

Test reset layout.

File

tests/src/Functional/LayoutPluginTest.php, line 63

Class

LayoutPluginTest
Tests DS layout plugins.

Namespace

Drupal\Tests\ds\Functional

Code

public function testResetLayout() {
  $layout = [
    'ds_layout' => 'ds_reset',
  ];
  $assert = [
    'regions' => [
      'ds_content' => '<td colspan="8">' . t('Content') . '</td>',
    ],
  ];
  $fields = [
    'fields[node_author][region]' => 'ds_content',
  ];
  $this
    ->dsSelectLayout($layout, $assert);
  $this
    ->dsConfigureUi($fields);

  // Create a node.
  $settings = [
    'type' => 'article',
  ];
  $node = $this
    ->drupalCreateNode($settings);
  $this
    ->drupalGet('node/' . $node
    ->id());
}