You are here

public function FeatureContext::beforeScenario in Acquia Lift Connector 7.2

Same name and namespace in other branches
  1. 7 behat-tests/features/bootstrap/FeatureContext.php \FeatureContext::beforeScenario()

Perform before scenario actions:

  • Gather all contexts so they can be reused in the current context.

@BeforeScenario

File

behat-tests/features/bootstrap/FeatureContext.php, line 61

Class

FeatureContext
Defines application features from the specific context.

Code

public function beforeScenario(BeforeScenarioScope $scope) {

  // Gather all contexts.
  $contexts = $scope
    ->getEnvironment()
    ->getContexts();
  foreach ($contexts as $context) {
    $context_class_name = get_class($context);
    $this->contexts[$context_class_name] = $context;
  }
}