function FontWeightTest::testToDtcg
Attributes
#[DataProvider('providerToDtcg')]
File
-
core/
tests/ Drupal/ Tests/ Core/ Theme/ DesignToken/ Plugin/ FontWeightTest.php, line 29
Class
- FontWeightTest
- Tests font weight value plugin.
Namespace
Drupal\Tests\Core\Theme\DesignToken\PluginCode
public function testToDtcg(mixed $value, mixed $expected) : void {
assert(is_string($expected) || is_int($expected));
$configuration = [
'value' => $value,
];
$plugin = new FontWeight($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.