You are here

class UserImportBasics in User Import 8

Same name and namespace in other branches
  1. 5 tests/user_import_basics.test \UserImportBasics

Create Invoice node test for Invoices module.

Hierarchy

Expanded class hierarchy of UserImportBasics

File

tests/user_import_basics.test, line 6

View source
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);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
UserImportBasics::get_info function
UserImportBasics::testCreateImport function User with right permissions creates import (with new settings)
UserImportTest::$user_importer property
UserImportTest::$user_limited_importer property
UserImportTest::checkAccountsExist function
UserImportTest::enableModules function enable necessary modules
UserImportTest::importID function Store import ID
UserImportTest::settingsEmailMatch function
UserImportTest::settingsFileSelect function Select CSV file (the included example file)
UserImportTest::settingsIgnoreFirstLine function
UserImportTest::setUp function
UserImportTest::tearDown function SimpleTest core method: code run after each and every test method. 1
UserImportTest::usersList function List of users (email addresses) being imported To Do - Generate this dynamically, bearing in mind it could be used for stress testing