public function SocialDrupalContext::bootstrapWithAdminUser in Open Social 10.3.x
Same name and namespace in other branches
- 8.9 tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::bootstrapWithAdminUser()
- 8.3 tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::bootstrapWithAdminUser()
- 8.4 tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::bootstrapWithAdminUser()
- 8.5 tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::bootstrapWithAdminUser()
- 8.6 tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::bootstrapWithAdminUser()
- 8.7 tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::bootstrapWithAdminUser()
- 8.8 tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::bootstrapWithAdminUser()
- 10.0.x tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::bootstrapWithAdminUser()
- 10.1.x tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::bootstrapWithAdminUser()
- 10.2.x tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::bootstrapWithAdminUser()
@beforeScenario @api
File
- tests/
behat/ features/ bootstrap/ SocialDrupalContext.php, line 75
Class
- SocialDrupalContext
- Provides pre-built step definitions for interacting with Open Social.
Namespace
Drupal\social\BehatCode
public function bootstrapWithAdminUser(BeforeScenarioScope $scope) {
$admin_user = User::load('1');
$current_user = \Drupal::getContainer()
->get('current_user');
$current_user
->setAccount($admin_user);
}