You are here

function UserImportNodeprofile::testCreateImport in User Import 8

Same name and namespace in other branches
  1. 5 tests/user_import_nodeprofile.test \UserImportNodeprofile::testCreateImport()

User with right permissions creates import (with new settings)

  • test import of user data into Nodeprofile module

File

tests/user_import_nodeprofile.test, line 22

Class

UserImportNodeprofile
Test import of user data into Profile module

Code

function testCreateImport() {
  $this
    ->enableModules($this->modules);
  $this
    ->nodeprofileConfiguration();

  // Prepare a user to do testing
  $this
    ->get('logout');

  // log out first
  $this
    ->drupalLoginUser($this->user_importer);

  // Select CSV file (the included example file)
  $this
    ->settingsFileSelect();

  // import settings
  $this
    ->importID($this
    ->getUrl());

  // store import ID for later
  $settings = array();
  $this
    ->settingsEmailMatch($settings);
  $this
    ->settingsNodeprofileMatch($settings);
  $this
    ->settingsIgnoreFirstLine($settings);
  $this
    ->drupalPostRequest($this
    ->getUrl(), $settings, 'Import');

  // check if users have been imported
  $this
    ->checkNodeprofileExist();
}