You are here

function TMGMTEntitySourceTestCase::setUp in Translation Management Tool 7

Overrides DrupalWebTestCase::setUp()

Overrides TMGMTBaseTestCase::setUp

File

sources/entity/tmgmt_entity.source.test, line 19

Class

TMGMTEntitySourceTestCase
Basic Entity Source tests.

Code

function setUp() {
  parent::setUp(array(
    'tmgmt_entity',
    'taxonomy',
    'entity_translation',
  ));

  // Admin user to perform settings on setup.
  $this
    ->loginAsAdmin(array(
    'administer entity translation',
  ));
  $this->vocabulary = $this
    ->createTaxonomyVocab(strtolower($this
    ->randomName()), $this
    ->randomName(), array(
    FALSE,
    TRUE,
    TRUE,
    TRUE,
  ));

  // Enable entity translations for taxonomy.
  $edit['entity_translation_entity_types[taxonomy_term]'] = 1;
  $this
    ->drupalPost('admin/config/regional/entity_translation', $edit, t('Save configuration'));
}