You are here

public function EntityReferenceSynonymsBehaviorWebTestCase::setUp in Synonyms 7

SetUp method.

Overrides AbstractSynonymsProviderFieldWebTestCase::setUp

File

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

Class

EntityReferenceSynonymsBehaviorWebTestCase
Test EntityReferenceSynonymsBehavior class.

Code

public function setUp($modules = array()) {
  $modules[] = 'entityreference';
  $this->fields['enabled']['field'] = array(
    'field_name' => 'reference',
    'cardinality' => FIELD_CARDINALITY_UNLIMITED,
    'type' => 'entityreference',
    // For the sake of experiment we use entityreference field that references
    // nodes of a Drupal standard type to make things easier.
    'settings' => array(
      'target_type' => 'node',
      'handler' => 'base',
      'handler_settings' => array(
        'target_bundles' => array(
          'page' => 'page',
        ),
        'sort' => array(
          'type' => 'none',
        ),
      ),
    ),
  );
  parent::setUp($modules);
}