You are here

protected function DevelTwigExtensionTest::setUp in Devel 8

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

Overrides KernelTestBase::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();
}