You are here

public function CSVTest::migrateExceptionKeysMissing in Migrate Source CSV 8

Tests that missing keys will throw an exception.

@test

@expectedException \Drupal\migrate\MigrateException

@expectedExceptionMessage You must declare "keys" as a unique array of fields in your source settings.

File

tests/src/Unit/Plugin/migrate/source/CSVTest.php, line 92
Code for CSVTest.php.

Class

CSVTest
@coversDefaultClass \Drupal\migrate_source_csv\Plugin\migrate\source\CSV

Namespace

Drupal\Tests\migrate_source_csv\Unit\Plugin\migrate\source

Code

public function migrateExceptionKeysMissing() {
  $configuration = [
    'path' => $this->happyPath,
  ];
  new CSV($configuration, $this->pluginId, $this->pluginDefinition, $this->plugin);
}