You are here

public function DataLayerKernelTest::setupMockUser in dataLayer 8

Setup user.

1 call to DataLayerKernelTest::setupMockUser()
DataLayerKernelTest::setupMockNode in tests/src/Kernel/DataLayerKernelTest.php
Setup mock node.

File

tests/src/Kernel/DataLayerKernelTest.php, line 202

Class

DataLayerKernelTest
Kernel test cases for datalayer module.

Namespace

Drupal\Tests\datalayer\Kernel

Code

public function setupMockUser() {
  $data = [
    'uid' => 1,
    'name' => 'admin',
    'password' => 'password',
    'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
  ];
  $this->user = User::create($data);
  $this->user
    ->save();
}