You are here

public function ViewsBulkOperationsKernelTestBase::setUp in Views Bulk Operations (VBO) 8.3

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/ViewsBulkOperationsKernelTestBase.php \Drupal\Tests\views_bulk_operations\Kernel\ViewsBulkOperationsKernelTestBase::setUp()
  2. 4.0.x tests/src/Kernel/ViewsBulkOperationsKernelTestBase.php \Drupal\Tests\views_bulk_operations\Kernel\ViewsBulkOperationsKernelTestBase::setUp()

Overrides KernelTestBase::setUp

2 calls to ViewsBulkOperationsKernelTestBase::setUp()
ViewsBulkOperationsActionProcessorTest::setUp in tests/src/Kernel/ViewsBulkOperationsActionProcessorTest.php
ViewsBulkOperationsDataServiceTest::setUp in tests/src/Kernel/ViewsBulkOperationsDataServiceTest.php
2 methods override ViewsBulkOperationsKernelTestBase::setUp()
ViewsBulkOperationsActionProcessorTest::setUp in tests/src/Kernel/ViewsBulkOperationsActionProcessorTest.php
ViewsBulkOperationsDataServiceTest::setUp in tests/src/Kernel/ViewsBulkOperationsDataServiceTest.php

File

tests/src/Kernel/ViewsBulkOperationsKernelTestBase.php, line 82

Class

ViewsBulkOperationsKernelTestBase
Base class for Views Bulk Operations kernel tests.

Namespace

Drupal\Tests\views_bulk_operations\Kernel

Code

public function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('user');
  $this
    ->installEntitySchema('node');
  $this
    ->installSchema('node', 'node_access');
  $this
    ->installSchema('system', 'sequences');
  $this
    ->installSchema('system', 'key_value_expire');
  $user = User::create();
  $user
    ->setPassword('password');
  $user
    ->enforceIsNew();
  $user
    ->setEmail('email');
  $user
    ->setUsername('user_name');
  $user
    ->save();
  user_login_finalize($user);
  $this
    ->installConfig([
    'system',
    'filter',
    'views_bulk_operations_test',
    'language',
  ]);

  // Get time and VBO view data services.
  $this->time = $this->container
    ->get('datetime.time');
  $this->vboDataService = $this->container
    ->get('views_bulk_operations.data');
}