function DesignTokenValuePluginBaseTest::providerPrepareConfiguration

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Theme/DesignToken/DesignTokenValuePluginBaseTest.php \Drupal\Tests\Core\Theme\DesignToken\DesignTokenValuePluginBaseTest::providerPrepareConfiguration()

Data provider for ::testPrepareConfiguration().

Return value

\Generator The test cases.

File

core/tests/Drupal/Tests/Core/Theme/DesignToken/DesignTokenValuePluginBaseTest.php, line 34

Class

DesignTokenValuePluginBaseTest
Tests design token value base methods.

Namespace

Drupal\Tests\Core\Theme\DesignToken

Code

public static function providerPrepareConfiguration() : iterable {
  yield 'String' => [
    'my value',
    [
      'value' => 'my value',
    ],
  ];
  yield 'Array: list' => [
    [
      'my value',
      'my value 2',
    ],
    [
      'value' => [
        'my value',
        'my value 2',
      ],
    ],
  ];
  yield 'Array: associative' => [
    [
      'unit' => 'rem',
    ],
    [
      'unit' => 'rem',
    ],
  ];
}

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