function dsBaseTest::dsCreateCodeField in Display Suite 7.2
Same name and namespace in other branches
- 7 tests/ds.base.test \dsBaseTest::dsCreateCodeField()
Create a code field.
Parameters
$edit: An optional array of field properties.
3 calls to dsBaseTest::dsCreateCodeField()
- 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.
- dsNodeTests::entitiesTestSetup in tests/
ds.entities.test - Utility function to setup for all kinds of tests.
File
- tests/
ds.base.test, line 116 - Base functions and tests for Display Suite.
Class
- dsBaseTest
- @file Base functions and tests for Display Suite.
Code
function dsCreateCodeField($edit = array(), $url = 'admin/structure/ds/fields/manage_custom') {
$edit += array(
'name' => 'Test field',
'field' => 'test_field',
'entities[node]' => '1',
'code[value]' => 'Test field',
'use_token' => '0',
);
$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'],
)));
}