function FontWeightTest::providerToDtcg

Data provider for ::testToDtcg().

Return value

\Generator The test cases.

File

core/tests/Drupal/Tests/Core/Theme/DesignToken/Plugin/FontWeightTest.php, line 45

Class

FontWeightTest
Tests font weight value plugin.

Namespace

Drupal\Tests\Core\Theme\DesignToken\Plugin

Code

public static function providerToDtcg() : iterable {
  foreach (FontWeightAlias::cases() as $case) {
    yield $case->name => [
      $case->value,
      $case->value(),
    ];
  }
  yield 'integer' => [
    50,
    50,
  ];
  yield 'minimum' => [
    1,
    1,
  ];
  yield 'maximum' => [
    1000,
    1000,
  ];
}

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