function FieldSettingsTest::testGetSettings
Same name in other branches
- 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()
- 10 core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php \Drupal\Tests\field\Unit\Plugin\migrate\process\d6\FieldSettingsTest::testGetSettings()
- 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 22
Class
- FieldSettingsTest
- @coversDefaultClass \Drupal\field\Plugin\migrate\process\d6\FieldSettings @group field
Namespace
Drupal\Tests\field\Unit\Plugin\migrate\process\d6Code
public function testGetSettings($field_type, $field_settings, $allowed_values) {
$migration = $this->createMock(MigrationInterface::class);
$plugin = new FieldSettings([], 'd6_field_settings', [], $migration);
$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.