function DimensionTest::testToDtcg
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Core/Theme/DesignToken/Plugin/DimensionTest.php \Drupal\Tests\Core\Theme\DesignToken\Plugin\DimensionTest::testToDtcg()
Attributes
#[DataProvider('providerToDtcg')]
Overrides DesignTokenValuePluginTestBase::testToDtcg
File
-
core/
tests/ Drupal/ Tests/ Core/ Theme/ DesignToken/ Plugin/ DimensionTest.php, line 30
Class
- DimensionTest
- Tests dimension value plugin.
Namespace
Drupal\Tests\Core\Theme\DesignToken\PluginCode
public function testToDtcg(mixed $value, mixed $expected) : void {
$this->assertIsArray($value);
$this->assertIsArray($expected);
$plugin = new Dimension($value, $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.