You are here

public function EntityReferenceTermMergeWebTestCase::setUp in Term Merge 7

SetUp method.

Overrides TermMergeWebTestCase::setUp

File

./term_merge.test, line 1680
Test the Term Merge module.

Class

EntityReferenceTermMergeWebTestCase
Test integration with Entity Reference module.

Code

public function setUp() {
  $modules = $this
    ->normalizeSetUpArguments(func_get_args());
  $modules[] = 'entityreference';
  parent::setUp($modules);
  $this
    ->drupalPost('admin/structure/types/add', array(
    'name' => $this
      ->randomName(),
    'type' => $this->content_type,
  ), 'Save content type');
  $this->field = field_create_field($this->field);
  $this->instance['field_name'] = $this->field['field_name'];
  $this->instance['entity_type'] = 'node';
  $this->instance['bundle'] = $this->content_type;
  $this->instance['label'] = $this
    ->randomName();
  $this->instance = field_create_instance($this->instance);
  $this->instance = field_info_instance($this->instance['entity_type'], $this->instance['field_name'], $this->instance['bundle']);
}