function ListFieldUITestCase::setUp
Set the default field storage backend for fields created during tests.
Overrides FieldTestCase::setUp
File
- 
              modules/
field/ modules/ list/ tests/ list.test, line 226  
Class
- ListFieldUITestCase
 - List module UI tests.
 
Code
function setUp() {
  parent::setUp('field_test', 'field_ui');
  // Create test user.
  $admin_user = $this->drupalCreateUser(array(
    'access content',
    'administer content types',
    'administer taxonomy',
    'administer fields',
  ));
  $this->drupalLogin($admin_user);
  // Create content type, with underscores.
  $type_name = 'test_' . strtolower($this->randomName());
  $type = $this->drupalCreateContentType(array(
    'name' => $type_name,
    'type' => $type_name,
  ));
  $this->type = $type->type;
  // Store a valid URL name, with hyphens instead of underscores.
  $this->hyphen_type = str_replace('_', '-', $this->type);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.