You are here

public function FeedsExamplesUserTestCase::test in Feeds 6

Same name and namespace in other branches
  1. 8.2 feeds_import/feeds_import.test \FeedsExamplesUserTestCase::test()
  2. 7.2 feeds_import/feeds_import.test \FeedsExamplesUserTestCase::test()
  3. 7 feeds_import/feeds_import.test \FeedsExamplesUserTestCase::test()

Run tests.

File

feeds_import/feeds_import.test, line 132
Tests for feeds_import feature.

Class

FeedsExamplesUserTestCase
Test User import configuration.

Code

public function test() {

  // Import CSV file.
  $this
    ->importFile('user', $this
    ->absolutePath() . '/tests/feeds/users.csv');

  // Assert result.
  $this
    ->assertText('Created 4 users.');

  // 1 user has an invalid email address.
  $this
    ->assertText('There was 1 user that could not be imported because either their name or their email was empty or not valid. Check import data and mapping settings on User processor.');
  $this
    ->drupalGet('admin/user/user');
  $this
    ->assertText('Morticia');
  $this
    ->assertText('Fester');
  $this
    ->assertText('Gomez');
  $this
    ->assertText('Pugsley');
}