public function DsTestTrait::dsSelectLayout in Display Suite 8.4
Same name and namespace in other branches
- 8.3 tests/src/Functional/DsTestTrait.php \Drupal\Tests\ds\Functional\DsTestTrait::dsSelectLayout()
Select a layout.
24 calls to DsTestTrait::dsSelectLayout()
- BlockFieldPluginTest::testBlockAccess in tests/
src/ Functional/ BlockFieldPluginTest.php - Ensure block is not rendered if block disallows access.
- BlockFieldPluginTest::testBlockAddWrappers in tests/
src/ Functional/ BlockFieldPluginTest.php - Tests the "Add block wrappers and classes" option.
- BlockFieldPluginTest::testBlockCache in tests/
src/ Functional/ BlockFieldPluginTest.php - Tests cache properties on blocks.
- BlockFieldPluginTest::testBlockFieldTitleOverride in tests/
src/ Functional/ BlockFieldPluginTest.php - Test block title override.
- CacheTagsTest::testUserCacheTags in tests/
src/ Functional/ CacheTagsTest.php - Tests setting the correct cache tags.
File
- tests/
src/ Functional/ DsTestTrait.php, line 13
Class
- DsTestTrait
- Provides common functionality for the Display Suite test classes.
Namespace
Drupal\Tests\ds\FunctionalCode
public function dsSelectLayout($edit = [], $assert = [], $url = 'admin/structure/types/manage/article/display', $options = []) {
$edit += [
'ds_layout' => 'ds_2col_stacked',
];
$this
->drupalGet($url, $options);
$this
->submitForm($edit, 'Save');
$assert += [
'regions' => [
'header' => '<td colspan="8">' . t('Header') . '</td>',
'left' => '<td colspan="8">' . t('Left') . '</td>',
'right' => '<td colspan="8">' . t('Right') . '</td>',
'footer' => '<td colspan="8">' . t('Footer') . '</td>',
],
];
foreach ($assert['regions'] as $region => $raw) {
$this
->assertSession()
->responseContains($region);
}
}