function FontFamilyTest::testToDtcg

Attributes

#[DataProvider('providerToDtcg')]

File

core/tests/Drupal/Tests/Core/Theme/DesignToken/Plugin/FontFamilyTest.php, line 28

Class

FontFamilyTest
Tests font family value plugin.

Namespace

Drupal\Tests\Core\Theme\DesignToken\Plugin

Code

public function testToDtcg(mixed $value, mixed $expected) : void {
  $this->assertIsArray($expected);
  $configuration = [
    'value' => $value,
  ];
  $plugin = new FontFamily($configuration, $this->pluginId, []);
  $this->assertSame($expected, $plugin->toDtcg());
}

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