function HistoryTimestampTest::setUp

Same name in other branches
  1. 9 core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php \Drupal\Tests\history\Kernel\Views\HistoryTimestampTest::setUp()
  2. 10 core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php \Drupal\Tests\history\Kernel\Views\HistoryTimestampTest::setUp()
  3. 11.x core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php \Drupal\Tests\history\Kernel\Views\HistoryTimestampTest::setUp()

Overrides ViewsKernelTestBase::setUp

File

core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php, line 37

Class

HistoryTimestampTest
Tests the history timestamp handlers.

Namespace

Drupal\Tests\history\Kernel\Views

Code

protected function setUp($import_test_views = TRUE) {
    parent::setUp($import_test_views);
    $this->installEntitySchema('node');
    $this->installEntitySchema('user');
    $this->installSchema('history', [
        'history',
    ]);
    // Use classy theme because its marker is wrapped in a span so it can be
    // easily targeted with xpath.
    \Drupal::service('theme_installer')->install([
        'classy',
    ]);
    \Drupal::theme()->setActiveTheme(\Drupal::service('theme.initialization')->initTheme('classy'));
}

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