class UserImportBasicsTestCase in User Import 8
Same name and namespace in other branches
- 6.4 user_import.test \UserImportBasicsTestCase
- 6.2 user_import.test \UserImportBasicsTestCase
- 7.3 user_import.test \UserImportBasicsTestCase
- 7 user_import.test \UserImportBasicsTestCase
- 7.2 user_import.test \UserImportBasicsTestCase
User Import module base test class.
Hierarchy
- class \UserImportWebTestCase extends \DrupalWebTestCase
- class \UserImportBasicsTestCase
Expanded class hierarchy of UserImportBasicsTestCase
File
- ./
user_import.test, line 134
View source
class UserImportBasicsTestCase extends UserImportWebTestCase {
public static function getInfo() {
return array(
'name' => 'Import Users (Basics)',
'description' => 'Import users from a CSV file, test basic functions.',
'group' => 'User Import',
);
}
function setUp() {
parent::setUp(array(
'user_import',
));
$this->admin_user = $this
->drupalCreateUser(array(
'administer users',
'access administration pages',
'access overlay',
));
$this->user_importer = $this
->drupalCreateUser(array(
'import users',
));
}
/**
* User with right permissions creates import (with new settings)
* - test core functions
*/
function testCreateImport() {
// Prepare a user to do testing
$this
->drupalLogin($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
->drupalPost($this
->getUrl(), $settings, 'Import');
// check if users have been imported
$this
->checkAccountsExist(TRUE);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
UserImportBasicsTestCase:: |
public static | function | ||
UserImportBasicsTestCase:: |
function | |||
UserImportBasicsTestCase:: |
function | User with right permissions creates import (with new settings) | ||
UserImportWebTestCase:: |
protected | property | ||
UserImportWebTestCase:: |
protected | property | ||
UserImportWebTestCase:: |
function | |||
UserImportWebTestCase:: |
function | Store import ID | ||
UserImportWebTestCase:: |
function | |||
UserImportWebTestCase:: |
function | Select CSV file (the included example file) | ||
UserImportWebTestCase:: |
function | |||
UserImportWebTestCase:: |
function | SimpleTest core method: code run after each and every test method. | ||
UserImportWebTestCase:: |
function | List of users (email addresses) being imported To Do - Generate this dynamically, bearing in mind it could be used for stress testing |