You are here

public function SalesforceMappingEntitiesTestCase::setUp in Salesforce Suite 7.3

Implementation of setUp().

Overrides SalesforceMappingTestCase::setUp

File

modules/salesforce_mapping/tests/salesforce_mapping.entities.test, line 29

Class

SalesforceMappingEntitiesTestCase
Tests the entities storing the Drupal to Salesforce mapping.

Code

public function setUp($modules = array(), $permissions = array()) {
  parent::setUp($modules, $permissions);

  // Create an example map.
  $this->example_map = array(
    'name' => 'foobar',
    'label' => 'Foo Bar',
    'type' => 'bazbang',
    'sync_triggers' => 0x2,
    'salesforce_object_type' => 'bar',
    'salesforce_record_type' => 'baz',
    'salesforce_record_types_allowed' => array(
      "baz" => "baz",
      "bogus" => "0",
    ),
    'drupal_entity_type' => 'node',
    'drupal_bundle' => 'story',
    'field_mappings' => array(
      'foo' => 'bar',
      'baz' => array(
        'bang' => 'boom',
        'fizz' => 'buzz',
      ),
      'hello' => 'world',
    ),
    'push_async' => 1,
    'push_batch' => 1,
    'weight' => 0,
    'status' => TRUE,
  );

  // Create an example record.
  $this->example_map_object = array(
    'salesforce_id' => uniqid(),
    'entity_id' => 3,
    'entity_type' => 'foobar',
  );
}