You are here

user_import_basics.test in User Import 5

Same filename and directory in other branches
  1. 8 tests/user_import_basics.test

File

tests/user_import_basics.test
View source
<?php

/**
 * 	Create Invoice node test for Invoices module.
 */
class UserImportBasics extends UserImportTest {
  function get_info() {
    return array(
      'name' => t('Import Users (Basics)'),
      'desc' => t('Import users from a CSV file, test basic functions'),
      'group' => t('User Import'),
    );
  }

  /**
   *  User with right permissions creates import (with new settings)
   *  - test core functions
   */
  function testCreateImport() {

    // Prepare a user to do testing
    $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
    $setting_edit = array();
    $this
      ->settingsEmailMatch($settings);
    $this
      ->settingsIgnoreFirstLine($settings);
    $this
      ->drupalPostRequest($this
      ->getUrl(), $settings, 'Import');

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

}

Classes

Namesort descending Description
UserImportBasics Create Invoice node test for Invoices module.