function ConfigTest::testSetValidation

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest::testSetValidation()
  2. 8.9.x core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest::testSetValidation()
  3. 10 core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest::testSetValidation()

@covers ::set

File

core/tests/Drupal/Tests/Core/Config/ConfigTest.php, line 266

Class

ConfigTest
Tests the Config.

Namespace

Drupal\Tests\Core\Config

Code

public function testSetValidation() : void {
    $this->expectException(ConfigValueException::class);
    $this->config
        ->set('testData', [
        'dot.key' => 1,
    ]);
}

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