function DesignTokenResourceTestBase::createEntity
File
-
core/
tests/ Drupal/ FunctionalTests/ Rest/ DesignTokenResourceTestBase.php, line 35
Class
- DesignTokenResourceTestBase
- Resource test base for the design_token entity.
Namespace
Drupal\FunctionalTests\RestCode
protected function createEntity() {
$entity = DesignToken::create([
'id' => 'my_token',
'path' => 'my-token',
'type' => 'fontWeight',
'scopes' => [
':root' => 500,
],
]);
$entity->save();
return $entity;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.