function FieldSettingsTest::getSettingsProvider

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::getSettingsProvider()
  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::getSettingsProvider()
  3. 11.x core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php \Drupal\Tests\field\Unit\Plugin\migrate\process\d6\FieldSettingsTest::getSettingsProvider()

Provides field settings for testGetSettings().

File

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

Class

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

Namespace

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

Code

public static 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',
            [],
            [],
        ],
    ];
}

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