protected function HistoryTimestampTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php \Drupal\Tests\history\Kernel\Views\HistoryTimestampTest::setUp()
- 10 core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php \Drupal\Tests\history\Kernel\Views\HistoryTimestampTest::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.
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\ViewsCode
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'));
}