function ContentCrudTestCase::createFieldText in Content Construction Kit (CCK) 6
Same name and namespace in other branches
- 6.3 tests/content.crud.test \ContentCrudTestCase::createFieldText()
- 6.2 tests/content.crud.test \ContentCrudTestCase::createFieldText()
Creates a textfield instance. Identical to createField() except it ensures that the text module is enabled, and adds default settings of type (text) and widget_type (text_textfield) if they are not given in $settings. @sa createField()
2 calls to ContentCrudTestCase::createFieldText()
File
- tests/
content.crud.test, line 290
Class
- ContentCrudTestCase
- Base class for CCK CRUD tests. Defines many helper functions useful for writing CCK CRUD tests.
Code
function createFieldText($settings, $content_type = 0) {
$this
->drupalModuleEnable('text');
$defaults = array(
'type' => 'text',
'widget_type' => 'text_textfield',
);
$settings = $settings + $defaults;
return $this
->createField($settings, $content_type);
}