You are here

public function TermMergeWebTestCase::setUp in Term Merge 7

SetUp method.

Overrides DrupalWebTestCase::setUp

4 calls to TermMergeWebTestCase::setUp()
EntityReferenceTermMergeWebTestCase::setUp in ./term_merge.test
SetUp method.
RedirectTermMergeWebTestCase::setUp in ./term_merge.test
SetUp method.
SynonymsTermMergeWebTestCase::setUp in ./term_merge.test
SetUp method.
ViewsTermMergeWebTestCase::setUp in ./term_merge.test
SetUp method.
4 methods override TermMergeWebTestCase::setUp()
EntityReferenceTermMergeWebTestCase::setUp in ./term_merge.test
SetUp method.
RedirectTermMergeWebTestCase::setUp in ./term_merge.test
SetUp method.
SynonymsTermMergeWebTestCase::setUp in ./term_merge.test
SetUp method.
ViewsTermMergeWebTestCase::setUp in ./term_merge.test
SetUp method.

File

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

Class

TermMergeWebTestCase
Base class for all tests of Term Merge module.

Code

public function setUp() {
  $modules = $this
    ->normalizeSetUpArguments(func_get_args());
  $modules[] = 'term_merge';
  parent::setUp($modules);
  $this->admin = $this
    ->drupalCreateUser(array(
    'administer fields',
    'administer taxonomy',
    'administer term merge',
    'merge terms',
    'administer content types',
    'bypass node access',
  ));

  // Creating vocabularies.
  $this
    ->drupalLogin($this->admin);
  $name = $this
    ->randomName();
  $this
    ->drupalPost('admin/structure/taxonomy/add', array(
    'name' => $name,
    'machine_name' => 'vocabulary',
    'description' => $this
      ->randomName(),
  ), 'Save');
  $this->vocabulary = taxonomy_vocabulary_machine_name_load('vocabulary');

  // Flushing static cache.
  _field_info_collate_fields(TRUE);
}