You are here

protected function ViewsKernelTestBase::setUp in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php \Drupal\Tests\views\Kernel\ViewsKernelTestBase::setUp()
  2. 9 core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php \Drupal\Tests\views\Kernel\ViewsKernelTestBase::setUp()

Parameters

bool $import_test_views: Should the views specified on the test class be imported. If you need to setup some additional stuff, like fields, you need to call false and then call createTestViews for your own.

2 calls to ViewsKernelTestBase::setUp()
FieldOrLanguageJoinTest::setUp in core/modules/views/tests/src/Kernel/Plugin/FieldOrLanguageJoinTest.php
JoinTest::setUp in core/modules/views/tests/src/Kernel/Plugin/JoinTest.php
36 methods override ViewsKernelTestBase::setUp()
ArgumentNodeRevisionIdTest::setUp in core/modules/node/tests/src/Kernel/Views/ArgumentNodeRevisionIdTest.php
ArgumentUidRevisionTest::setUp in core/modules/node/tests/src/Kernel/Views/ArgumentUidRevisionTest.php
ArgumentValidateTest::setUp in core/modules/user/tests/src/Kernel/Views/ArgumentValidateTest.php
CacheTest::setUp in core/modules/views/tests/src/Kernel/Plugin/CacheTest.php
CommentAdminViewTest::setUp in core/modules/comment/tests/src/Kernel/Views/CommentAdminViewTest.php

... See full list

File

core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php, line 47

Class

ViewsKernelTestBase
Defines a base class for Views kernel testing.

Namespace

Drupal\Tests\views\Kernel

Code

protected function setUp($import_test_views = TRUE) : void {
  parent::setUp();
  $this
    ->installSchema('system', [
    'sequences',
  ]);
  $this
    ->setUpFixtures();
  if ($import_test_views) {
    ViewTestData::createTestViews(static::class, [
      'views_test_config',
    ]);
  }
}