function FileFieldTest::testGetFieldType

Tests get field type.

@legacy-covers ::getFieldType

Attributes

#[DataProvider('getFieldTypeProvider')]

File

core/modules/file/tests/src/Unit/Plugin/migrate/field/d6/FileFieldTest.php, line 90

Class

FileFieldTest
Tests Drupal\file\Plugin\migrate\field\d6\FileField.

Namespace

Drupal\Tests\file\Unit\Plugin\migrate\field\d6

Code

public function testGetFieldType($expected_type, $widget_type, array $settings = []) : void {
  $row = new Row();
  $row->setSourceProperty('widget_type', $widget_type);
  $row->setSourceProperty('global_settings', $settings);
  $this->assertSame($expected_type, $this->plugin
    ->getFieldType($row));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.