You are here

function UserImportNodeprofile::testCreateImport in User Import 5

Same name and namespace in other branches
  1. 8 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();

  // 		$html = $this->drupalGet('node/add/identity');
  //    var_dump($html);
  // Prepare a user to do testing
  $this
    ->get('logout');

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

  //$html = $this->drupalGet('admin/user/access');

  //var_dump($html);

  // 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();
}