public function LayoutPluginTest::testResetLayout in Display Suite 8.3
Same name and namespace in other branches
- 8.4 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\FunctionalCode
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());
}