class UserImportBasics in User Import 8
Same name and namespace in other branches
- 5 tests/user_import_basics.test \UserImportBasics
Create Invoice node test for Invoices module.
Hierarchy
- class \UserImportTest extends \DrupalTestCase
- class \UserImportBasics
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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
UserImportBasics:: |
function | |||
UserImportBasics:: |
function | User with right permissions creates import (with new settings) | ||
UserImportTest:: |
property | |||
UserImportTest:: |
property | |||
UserImportTest:: |
function | |||
UserImportTest:: |
function | enable necessary modules | ||
UserImportTest:: |
function | Store import ID | ||
UserImportTest:: |
function | |||
UserImportTest:: |
function | Select CSV file (the included example file) | ||
UserImportTest:: |
function | |||
UserImportTest:: |
function | |||
UserImportTest:: |
function | SimpleTest core method: code run after each and every test method. | 1 | |
UserImportTest:: |
function | List of users (email addresses) being imported To Do - Generate this dynamically, bearing in mind it could be used for stress testing |