class FeedsExamplesUserTestCase in Feeds 8.2
Same name and namespace in other branches
- 6 feeds_import/feeds_import.test \FeedsExamplesUserTestCase
- 7.2 feeds_import/feeds_import.test \FeedsExamplesUserTestCase
- 7 feeds_import/feeds_import.test \FeedsExamplesUserTestCase
Test User import configuration.
Hierarchy
- class \FeedsExamplesUserTestCase extends \FeedsWebTestCase
Expanded class hierarchy of FeedsExamplesUserTestCase
File
- feeds_import/
feeds_import.test, line 116 - Tests for feeds_import feature.
View source
class FeedsExamplesUserTestCase extends FeedsWebTestCase {
public static function getInfo() {
return array(
'name' => 'Feature: User import',
'description' => 'Test "User import" default configuration.',
'group' => 'Feeds',
);
}
public function setUp() {
parent::setUp(array(
'feeds_import',
));
}
/**
* Run tests.
*/
public function test() {
// Import CSV file.
$this
->importFile('user', $this
->absolutePath() . '/tests/feeds/users.csv');
// Assert result.
$this
->assertText('Created 3 users');
// 1 user has an invalid email address.
$this
->assertText('Failed importing 2 users');
$this
->drupalGet('admin/people');
$this
->assertText('Morticia');
$this
->assertText('Fester');
$this
->assertText('Gomez');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FeedsExamplesUserTestCase:: |
public static | function | ||
FeedsExamplesUserTestCase:: |
public | function | ||
FeedsExamplesUserTestCase:: |
public | function | Run tests. |