You are here

public function FeedsMapperLocationTestCase::saveUserLocationSettings in Location Feeds 7

1 call to FeedsMapperLocationTestCase::saveUserLocationSettings()
UserFeedsMapperLocationTestCase::test in tests/location_feeds.user.test
Basic test loading an RSS feed for users with locations.

File

tests/location_feeds.test.inc, line 54

Class

FeedsMapperLocationTestCase
Class for testing Feeds <em>location</em> mapper.

Code

public function saveUserLocationSettings(&$settings) {

  // Get the (settable) defaults.
  $defaults = LocationTestCase::getLocationFieldDefaults();
  $settings = array(
    'location_settings_user' => array(
      'multiple' => array(
        'max' => 1,
        'add' => 1,
      ),
      'form' => array(
        'fields' => $defaults,
      ),
    ),
  );
  LocationTestCase::flattenPostData($settings);
  $this
    ->drupalPost('admin/config/people/accounts', $settings, 'Save configuration');
  $this
    ->refreshVariables();
  $settings = variable_get('location_settings_user', array());
}