function DesignTokenValidationTest::testImmutableProperties

File

core/tests/Drupal/KernelTests/Core/Theme/DesignToken/DesignTokenValidationTest.php, line 54

Class

DesignTokenValidationTest
Tests validation of design_token entities.

Namespace

Drupal\KernelTests\Core\Theme\DesignToken

Code

public function testImmutableProperties(array $valid_values = []) : void {
  // If we don't clear the previous scopes here, we will get unrelated
  // validation errors (in addition to the one we're expecting), because the
  // scopes from the *old* type won't match the config schema for the
  // scopes of the *new* type.
  $this->entity
    ->set('scopes', []);
  parent::testImmutableProperties([
    'type' => 'fontWeight',
  ]);
}

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