You are here

public function SocialDrupalContext::bootstrapWithAdminUser in Open Social 8.9

Same name and namespace in other branches
  1. 8.3 tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::bootstrapWithAdminUser()
  2. 8.4 tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::bootstrapWithAdminUser()
  3. 8.5 tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::bootstrapWithAdminUser()
  4. 8.6 tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::bootstrapWithAdminUser()
  5. 8.7 tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::bootstrapWithAdminUser()
  6. 8.8 tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::bootstrapWithAdminUser()
  7. 10.3.x tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::bootstrapWithAdminUser()
  8. 10.0.x tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::bootstrapWithAdminUser()
  9. 10.1.x tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::bootstrapWithAdminUser()
  10. 10.2.x tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::bootstrapWithAdminUser()

@beforeScenario @api

File

tests/behat/features/bootstrap/SocialDrupalContext.php, line 73

Class

SocialDrupalContext
Provides pre-built step definitions for interacting with Open Social.

Namespace

Drupal\social\Behat

Code

public function bootstrapWithAdminUser(BeforeScenarioScope $scope) {
  $admin_user = user_load('1');
  $current_user = \Drupal::getContainer()
    ->get('current_user');
  $current_user
    ->setAccount($admin_user);
}