You are here

function FFCTestCase::ffcSelectLayout in Field formatter conditions 7

Select a layout.

1 call to FFCTestCase::ffcSelectLayout()
FFCTestCase::testDisplaySuite in tests/ffc.test
Tests with Display Suite.

File

tests/ffc.test, line 96
Test file for Field formatter conditions.

Class

FFCTestCase
Group UI tests.

Code

function ffcSelectLayout($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,
    )));
  }
}