Skip to content

Commit

Permalink
OPENEUROPA-1873: Fixing the installation of the User module in the Ke…
Browse files Browse the repository at this point in the history
…rnel test.
  • Loading branch information
upchuk committed May 2, 2019
1 parent af1c71c commit 8a8a77b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/Kernel/AbstractKernelTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ protected function setUp() {
$this->container->get('theme_installer')->install(['oe_theme']);
$this->container->get('theme_handler')->setDefault('oe_theme');
$this->container->set('theme.registry', NULL);

// Call the install hook of the User module which creates the Anonymous user
// and User 1. This is needed because the Anonymous user is loaded to
// provide the current User context which is needed in places like route
// enhancers.
// @see CurrentUserContext::getRuntimeContexts().
// @see EntityConverter::convert().
module_load_include('install', 'user');
user_install();
}

/**
Expand Down

0 comments on commit 8a8a77b

Please sign in to comment.