protected function ViewsNoResultsBehaviorTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/tests/src/Functional/ViewsNoResultsBehaviorTest.php \Drupal\Tests\views\Functional\ViewsNoResultsBehaviorTest::setUp()
- 9 core/modules/views/tests/src/Functional/ViewsNoResultsBehaviorTest.php \Drupal\Tests\views\Functional\ViewsNoResultsBehaviorTest::setUp()
File
- core/
modules/ views/ tests/ src/ Functional/ ViewsNoResultsBehaviorTest.php, line 27
Class
- ViewsNoResultsBehaviorTest
- Tests no results behavior.
Namespace
Drupal\Tests\views\FunctionalCode
protected function setUp($import_test_views = TRUE, $modules = []) : void {
parent::setUp($import_test_views, $modules);
$this
->enableViewsTestModule();
$user = $this
->createUser([], NULL, TRUE);
$this
->drupalLogin($user);
// Set the Stark theme and use the default templates from views module.
/** @var \Drupal\Core\Extension\ThemeInstallerInterface $theme_installer */
$theme_installer = \Drupal::service('theme_installer');
$theme_installer
->install([
'stark',
]);
$this
->config('system.theme')
->set('default', 'stark')
->save();
}