function ContentCrudTestCase::createFieldText in Content Construction Kit (CCK) 6.2
Same name and namespace in other branches
- 6.3 tests/content.crud.test \ContentCrudTestCase::createFieldText()
 - 6 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()
4 calls to ContentCrudTestCase::createFieldText()
File
- tests/
content.crud.test, line 307  
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) {
  $defaults = array(
    'type' => 'text',
    'widget_type' => 'text_textfield',
  );
  $settings = $settings + $defaults;
  return $this
    ->createField($settings, $content_type);
}