function RoleValidationTest::setUpEnvironment
Same name and namespace in other branches
- main core/modules/user/tests/src/Kernel/RoleValidationTest.php \Drupal\Tests\user\Kernel\RoleValidationTest::setUpEnvironment()
Overrides ConfigEntityValidationTestBase::setUpEnvironment
File
-
core/
modules/ user/ tests/ src/ Kernel/ RoleValidationTest.php, line 31
Class
- RoleValidationTest
- Tests validation of user_role entities.
Namespace
Drupal\Tests\user\KernelCode
protected function setUpEnvironment() : void {
parent::setUpEnvironment();
$this->installConfig('user');
$this->entity = Role::create([
'id' => 'test',
'label' => 'Test',
]);
$this->entity
->save();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.