You are here

public function UIFPlusTestCase::testUIFPlusWrongHeader in User Import Framework Plus 7

Test wrong headers in CSV file. There should be a warning that the field(s) will be ignored in the data import.

File

./uif_plus.test, line 46
Test cases for User Import Framework Plus module

Class

UIFPlusTestCase
@file

Code

public function testUIFPlusWrongHeader() {
  $this
    ->drupalLogin($this->import_user);
  $edit = array();
  $edit['files[user_upload]'] = DRUPAL_ROOT . '/' . drupal_get_path('module', 'uif_plus') . '/data/test_headers_1.csv';
  $this
    ->drupalPost('admin/people/uif', $edit, t('Next'));
  $this
    ->assertText(t('Unknown column profile_employer in the import file. Data in this column will be ignored', array()));
  $this
    ->drupalPost(NULL, array(), t('Import users'));
  $this
    ->assertText(t('User import complete', array()));
}