You are here

protected function DevelQueryDebugTest::setUp in Devel 8

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

Overrides KernelTestBase::setUp

File

tests/src/Kernel/DevelQueryDebugTest.php, line 31

Class

DevelQueryDebugTest
Tests query debug.

Namespace

Drupal\Tests\devel\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installSchema('system', 'sequences');
  $this
    ->installConfig([
    'system',
    'devel',
  ]);
  $this
    ->installEntitySchema('user');
  $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();
}