You are here

public function CSVUnitTest::testFields in Migrate Source CSV 8.3

Same name and namespace in other branches
  1. 8.2 tests/src/Unit/Plugin/migrate/source/CSVUnitTest.php \Drupal\Tests\migrate_source_csv\Unit\Plugin\migrate\source\CSVUnitTest::testFields()

Tests that fields have a machine name and description.

@covers ::fields @dataProvider fieldsDataProvider

Parameters

array $configuration: The plugin configuration.

array $expected: The expected results.

File

tests/src/Unit/Plugin/migrate/source/CSVUnitTest.php, line 357

Class

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

Namespace

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

Code

public function testFields(array $configuration, array $expected) : void {
  $csv = new CSV($configuration + [
    'path' => $this->standardCharsPath,
  ], $this->pluginId, $this->pluginDefinition, $this->migration);
  $this
    ->assertSame($expected, $csv
    ->fields());
}