You are here

public function TaxonomySynonymsBehaviorWebTestCase::setUp in Synonyms 7

SetUp method.

Overrides AbstractSynonymsProviderFieldWebTestCase::setUp

File

synonyms_provider_field/synonyms_provider_field.test, line 383
Tests for the Synonyms field provider module.

Class

TaxonomySynonymsBehaviorWebTestCase
Test TaxonomySynonymsBehavior class.

Code

public function setUp($modules = array()) {
  $this->fields['enabled']['field'] = array(
    'field_name' => 'term',
    'cardinality' => FIELD_CARDINALITY_UNLIMITED,
    'type' => 'taxonomy_term_reference',
    'settings' => array(
      'allowed_values' => array(
        array(
          'vocabulary' => 'source_vocabulary',
          'parent' => 0,
        ),
      ),
    ),
  );
  parent::setUp($modules);
  $this->vocabularySource = (object) array(
    'name' => $this
      ->randomName(),
    'machine_name' => 'source_vocabulary',
  );
  taxonomy_vocabulary_save($this->vocabularySource);
}