public function SocialDrupalContext::bootstrapWithAdminUser in Open Social 8.2
Same name and namespace in other branches
- 8 tests/behat/features/bootstrap/SocialDrupalContext.php \SocialDrupalContext::bootstrapWithAdminUser()
@beforeScenario @api
File
- tests/
behat/ features/ bootstrap/ SocialDrupalContext.php, line 49
Class
- SocialDrupalContext
- Provides pre-built step definitions for interacting with Open Social.
Code
public function bootstrapWithAdminUser(BeforeScenarioScope $scope) {
$admin_user = user_load('1');
$current_user = \Drupal::getContainer()
->get('current_user');
$current_user
->setAccount($admin_user);
}