function UserImportWebTestCase::tearDown in User Import 6.2
Same name and namespace in other branches
- 8 user_import.test \UserImportWebTestCase::tearDown()
- 6.4 user_import.test \UserImportWebTestCase::tearDown()
- 7.3 user_import.test \UserImportWebTestCase::tearDown()
- 7 user_import.test \UserImportWebTestCase::tearDown()
- 7.2 user_import.test \UserImportWebTestCase::tearDown()
SimpleTest core method: code run after each and every test method.
Overrides DrupalWebTestCase::tearDown
1 call to UserImportWebTestCase::tearDown()
- UserImportNodeprofileTestCase::tearDown in ./
user_import.test - SimpleTest core method: code run after each and every test method.
1 method overrides UserImportWebTestCase::tearDown()
- UserImportNodeprofileTestCase::tearDown in ./
user_import.test - SimpleTest core method: code run after each and every test method.
File
- ./
user_import.test, line 114
Class
- UserImportWebTestCase
- User Import module base test class.
Code
function tearDown() {
// delete accounts of users imported
$users_email = $this
->usersList();
foreach ($users_email as $mail) {
$account = user_load(array(
'mail' => $mail,
));
if (!empty($account)) {
user_delete(array(), $account->uid);
}
}
// delete the import
$import_id = $this
->importID();
$this
->assertTrue(!empty($import_id), t('Import ID: !id', array(
'!id' => $import_id,
)));
_user_import_settings_deletion($import_id);
// Always call the tearDown() function from the parent class.
parent::tearDown();
}