function ConfigTest::testSetName
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest::testSetName()
- 8.9.x core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest::testSetName()
- 10 core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest::testSetName()
@covers ::setName @dataProvider setNameProvider
File
-
core/
tests/ Drupal/ Tests/ Core/ Config/ ConfigTest.php, line 80
Class
- ConfigTest
- Tests the Config.
Namespace
Drupal\Tests\Core\ConfigCode
public function testSetName($name) : void {
// Set the name.
$this->config
->setName($name);
// Check that the name has been set correctly.
$this->assertEquals($name, $this->config
->getName());
// Check that the name validates.
// Should throw \Drupal\Core\Config\ConfigNameException if invalid.
$this->config
->validateName($name);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.