protected function UserProfilePageTest::setUp in Context 8.4
Overrides KernelTestBase::setUp
File
- tests/
src/ Kernel/ UserProfilePageTest.php, line 54
Class
- UserProfilePageTest
- Tests the user profile page condition plugin.
Namespace
Drupal\Tests\context\KernelCode
protected function setUp() : void {
parent::setUp();
$this
->setUpCurrentUser([
'uid' => 2,
], [
'access user profiles',
]);
$this
->installEntitySchema('user');
$this->pluginManager = $this->container
->get('plugin.manager.condition');
// Set the test request stack in the container.
$this->requestStack = new RequestStack();
$this->container
->set('request_stack', $this->requestStack);
$this->currentPath = new CurrentPathStack($this->requestStack);
$this->container
->set('path.current', $this->currentPath);
$this->container
->set('current_route_match', new CurrentRouteMatch($this->requestStack));
}