You are here

function dsBaseTest::dsSelectLayout in Display Suite 7.2

Same name and namespace in other branches
  1. 7 tests/ds.base.test \dsBaseTest::dsSelectLayout()

Select a layout.

11 calls to dsBaseTest::dsSelectLayout()
dsExportablesTests::testDSExportablesLayoutFieldsettings in tests/ds.exportables.test
dsFieldPermissionTests::testFieldPermissions in tests/ds.base.test
dsFieldsTests::testDSFields in tests/ds.base.test
Test Display fields.
dsFormTests::testDSForms in tests/ds.forms.test
Forms tests.
dsHooksTests::testDSFields in tests/ds.base.test
Test fields hooks.

... See full list

File

tests/ds.base.test, line 26
Base functions and tests for Display Suite.

Class

dsBaseTest
@file Base functions and tests for Display Suite.

Code

function dsSelectLayout($edit = array(), $assert = array(), $url = 'admin/structure/types/manage/article/display', $options = array()) {
  $edit += array(
    'additional_settings[layout]' => 'ds_2col_stacked',
  );
  $this
    ->drupalPost($url, $edit, t('Save'), $options);
  $assert += array(
    'regions' => array(
      '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
      ->assertRaw($region, t('Region !region found', array(
      '!region' => $region,
    )));
  }
}