function AreaEntityTest::setUpFixtures

Same name and namespace in other branches
  1. 9 core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php \Drupal\Tests\views\Kernel\Handler\AreaEntityTest::setUpFixtures()
  2. 8.9.x core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php \Drupal\Tests\views\Kernel\Handler\AreaEntityTest::setUpFixtures()
  3. 11.x core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php \Drupal\Tests\views\Kernel\Handler\AreaEntityTest::setUpFixtures()

Sets up the configuration and schema of views and views_test_data modules.

Because the schema of views_test_data.module is dependent on the test using it, it cannot be enabled normally.

Overrides ViewsKernelTestBase::setUpFixtures

File

core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php, line 46

Class

AreaEntityTest
Tests the generic entity area handler.

Namespace

Drupal\Tests\views\Kernel\Handler

Code

protected function setUpFixtures() {
  // Install the themes used for this test.
  $this->container
    ->get('theme_installer')
    ->install([
    'olivero',
  ]);
  $this->container
    ->get('config.factory')
    ->getEditable('system.theme')
    ->set('default', 'olivero')
    ->save();
  $this->installEntitySchema('user');
  $this->installEntitySchema('entity_test');
  $this->installConfig([
    'entity_test',
  ]);
  $this->placeBlock('system_main_block', [
    'id' => 'test_block',
  ]);
  parent::setUpFixtures();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.