function dsBaseTest::dsCreatePreprocessField in Display Suite 7.2
Same name and namespace in other branches
- 7 tests/ds.base.test \dsBaseTest::dsCreatePreprocessField()
Create a block field.
Parameters
$edit: An optional array of field properties.
2 calls to dsBaseTest::dsCreatePreprocessField()
- dsFieldsTests::testDSFields in tests/
ds.base.test - Test Display fields.
- dsLayoutsClassesTests::testDStestLayouts in tests/
ds.base.test - Test selecting layouts, classes, region to block and fields.
File
- tests/
ds.base.test, line 159 - Base functions and tests for Display Suite.
Class
- dsBaseTest
- @file Base functions and tests for Display Suite.
Code
function dsCreatePreprocessField($edit = array(), $url = 'admin/structure/ds/fields/manage_preprocess', $first = TRUE) {
$edit += array(
'name' => 'Submitted',
'entities[node]' => '1',
);
if ($first) {
$edit += array(
'field' => 'submitted',
);
}
$this
->drupalPost($url, $edit, t('Save'));
$this
->assertText(t('The field ' . $edit['name'] . ' has been saved'), t('!name field has been saved', array(
'!name' => $edit['name'],
)));
}