public function FieldSettingsTest::testGetSettings in Drupal 8
Same name and namespace in other branches
- 9 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()
@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']);
}