function ConfigTest::testSetIllegalOffsetValue
@covers ::set
      
    
File
- 
              core/tests/ Drupal/ Tests/ Core/ Config/ ConfigTest.php, line 270 
Class
- ConfigTest
- Tests the Config.
Namespace
Drupal\Tests\Core\ConfigCode
public function testSetIllegalOffsetValue() {
  // Set a single value.
  $this->config
    ->set('testData', 1);
  // Attempt to treat the single value as a nested item.
  if (PHP_VERSION_ID >= 80000) {
    $this->expectError();
  }
  else {
    $this->expectWarning();
  }
  $this->config
    ->set('testData.illegalOffset', 1);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
