getMock(MigrationInterface::class); $plugin = new FieldSettings([], 'd6_field_settings', [], $migration); $executable = $this->getMock(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']); } /** * Provides field settings for testGetSettings(). */ public function getSettingsProvider() { return [ [ 'list_integer', ['allowed_values' => "1|One\n2|Two\n3"], [ '1' => 'One', '2' => 'Two', '3' => '3', ], ], [ 'list_string', ['allowed_values' => NULL], [], ], [ 'list_float', ['allowed_values' => ""], [], ], [ 'boolean', [], [], ], ]; } }