function DevelTwigExtensionTest::setUp

Same name in other branches
  1. 4.x tests/src/Kernel/DevelTwigExtensionTest.php \Drupal\Tests\devel\Kernel\DevelTwigExtensionTest::setUp()
  2. 5.x tests/src/Kernel/DevelTwigExtensionTest.php \Drupal\Tests\devel\Kernel\DevelTwigExtensionTest::setUp()

File

tests/src/Kernel/DevelTwigExtensionTest.php, line 38

Class

DevelTwigExtensionTest
Tests Twig extensions.

Namespace

Drupal\Tests\devel\Kernel

Code

protected function setUp() {
    parent::setUp();
    $this->installEntitySchema('user');
    $this->installSchema('system', 'sequences');
    $devel_role = Role::create([
        'id' => 'admin',
        'permissions' => [
            'access devel information',
        ],
    ]);
    $devel_role->save();
    $this->develUser = User::create([
        'name' => $this->randomMachineName(),
        'roles' => [
            $devel_role->id(),
        ],
    ]);
    $this->develUser
        ->save();
}