You are here

public function FieldSettingsTest::getSettingsProvider in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 43
Contains \Drupal\Tests\field\Unit\Plugin\migrate\process\d6\FieldSettingsTest.

Class

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

Namespace

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

Code

public function getSettingsProvider() {
  return array(
    array(
      'list_integer',
      array(
        'allowed_values' => "1|One\n2|Two\n3",
      ),
      array(
        '1' => 'One',
        '2' => 'Two',
        '3' => '3',
      ),
    ),
    array(
      'list_string',
      array(
        'allowed_values' => NULL,
      ),
      array(),
    ),
    array(
      'list_float',
      array(
        'allowed_values' => "",
      ),
      array(),
    ),
    array(
      'boolean',
      array(),
      array(),
    ),
  );
}