public function ConfigTest::testSetName in Drupal 8
Same name and namespace in other branches
- 9 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 74
Class
- ConfigTest
- Tests the Config.
Namespace
Drupal\Tests\Core\ConfigCode
public function testSetName($name) {
// 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);
}