You are here

function FieldTokensTestCase::setUp in Field tokens 7

@inheritdoc

Overrides ImageFieldTestCase::setUp

File

tests/field_tokens.test, line 18
Tests for the Field tokens module.

Class

FieldTokensTestCase
Class FieldTokensTestCase

Code

function setUp() {

  // Setup required modules.
  DrupalWebTestCase::setUp('field_tokens', 'image');

  // Create a content type.
  $bundle = $this
    ->drupalCreateContentType();
  $this->content_type = $bundle->name;

  // Create an Image field.
  $this->field_name = strtolower($this
    ->randomName());
  $this
    ->createImageField($this->field_name, $this->content_type);

  // Create Admin user.
  $this->admin_user = $this
    ->drupalCreateUser(array(
    'administer content types',
    "create {$this->content_type} content",
  ));

  // Login with Admin user.
  $this
    ->drupalLogin($this->admin_user);
}