You are here

public function FeedsExamplesUserTestCase::test in Feeds 8.2

Same name and namespace in other branches
  1. 6 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 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');
}