function DevelTwigExtensionTest::setUp
Same name in other branches
- 5.x tests/src/Kernel/DevelTwigExtensionTest.php \Drupal\Tests\devel\Kernel\DevelTwigExtensionTest::setUp()
Overrides KernelTestBase::setUp
File
-
tests/
src/ Kernel/ DevelTwigExtensionTest.php, line 39
Class
- DevelTwigExtensionTest
- Tests Twig extensions.
Namespace
Drupal\Tests\devel\KernelCode
protected function setUp() {
parent::setUp();
$this->installEntitySchema('user');
$this->installSchema('system', 'sequences');
$devel_role = Role::create([
'id' => 'admin',
'label' => 'Admin',
'permissions' => [
'access devel information',
],
]);
$devel_role->save();
$this->develUser = User::create([
'name' => $this->randomMachineName(),
'roles' => [
$devel_role->id(),
],
]);
$this->develUser
->save();
}