public function CSVUnitTest::testMigrateExceptionKeysMissing in Migrate Source CSV 8.2
Same name and namespace in other branches
- 8.3 tests/src/Unit/Plugin/migrate/source/CSVUnitTest.php \Drupal\Tests\migrate_source_csv\Unit\Plugin\migrate\source\CSVUnitTest::testMigrateExceptionKeysMissing()
Tests that missing keys will throw an exception.
File
- tests/
src/ Unit/ Plugin/ migrate/ source/ CSVUnitTest.php, line 83
Class
- CSVUnitTest
- @coversDefaultClass \Drupal\migrate_source_csv\Plugin\migrate\source\CSV
Namespace
Drupal\Tests\migrate_source_csv\Unit\Plugin\migrate\sourceCode
public function testMigrateExceptionKeysMissing() {
$configuration = [
'path' => $this->happyPath,
];
$this
->setExpectedException(MigrateException::class, 'You must declare "keys" as a unique array of fields in your source settings.');
new CSV($configuration, $this->pluginId, $this->pluginDefinition, $this->migration);
}