/** * @covers ::setName * @dataProvider setNameProvider */ 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); }