You are here

function dsBaseTest::dsCreateViewMode in Display Suite 7

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

Create a view mode.

Parameters

$edit: An optional array of view mode properties.

1 call to dsBaseTest::dsCreateViewMode()
dsViewModesTests::testDSManageViewModes in tests/ds.base.test
Test managing view modes.

File

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

Class

dsBaseTest
@file Base functions and tests for Display Suite.

Code

function dsCreateViewMode($edit = array()) {
  $edit += array(
    'name' => 'Testing',
    'view_mode' => 'testing',
    'entities[node]' => '1',
  );
  $this
    ->drupalPost('admin/structure/ds/view_modes/manage', $edit, t('Save'));
  $this
    ->assertText(t('The view mode ' . $edit['name'] . ' has been saved'), t('!name view mode has been saved', array(
    '!name' => $edit['name'],
  )));
}