function FieldSettingsTest::testGetSettings

Same name in other branches
  1. 9 core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php \Drupal\Tests\field\Unit\Plugin\migrate\process\d6\FieldSettingsTest::testGetSettings()
  2. 8.9.x core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php \Drupal\Tests\field\Unit\Plugin\migrate\process\d6\FieldSettingsTest::testGetSettings()
  3. 11.x core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php \Drupal\Tests\field\Unit\Plugin\migrate\process\d6\FieldSettingsTest::testGetSettings()

@covers ::getSettings

@dataProvider getSettingsProvider

File

core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php, line 24

Class

FieldSettingsTest
@coversDefaultClass \Drupal\field\Plugin\migrate\process\d6\FieldSettings @group field

Namespace

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

Code

public function testGetSettings($field_type, $field_settings, $allowed_values) : void {
    $migration = $this->createMock(MigrationInterface::class);
    $plugin = new FieldSettings([], 'd6_field_settings', []);
    $executable = $this->createMock(MigrateExecutableInterface::class);
    $row = $this->getMockBuilder(Row::class)
        ->disableOriginalConstructor()
        ->getMock();
    $result = $plugin->transform([
        $field_type,
        $field_settings,
        NULL,
    ], $executable, $row, 'foo');
    $this->assertSame($allowed_values, $result['allowed_values']);
}

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